<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:georss='http://www.georss.org/georss' xmlns:gd='http://schemas.google.com/g/2005' xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-5063286</id><updated>2011-10-05T23:14:41.830-05:00</updated><category term='programming'/><title type='text'>Quantum Monte Carlo</title><subtitle type='html'>Thoughts, information, and links about Quantum Monte Carlo methods (and classical MC methods, too)</subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://quantum_mc.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5063286/posts/default?max-results=100'/><link rel='alternate' type='text/html' href='http://quantum_mc.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><link rel='next' type='application/atom+xml' href='http://www.blogger.com/feeds/5063286/posts/default?start-index=101&amp;max-results=100'/><author><name>Mark</name><uri>http://www.blogger.com/profile/03956296363343527391</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>104</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>100</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-5063286.post-3328163449211454484</id><published>2011-10-05T23:18:00.000-05:00</published><updated>2011-10-05T23:14:41.873-05:00</updated><title type='text'>Video of SciPy 2011 talk</title><content type='html'>The video from my SciPy 2011 talk is available &lt;a href="http://www.archive.org/details/Thursday-204-6-ConstructingScientificProgramsUsingSympy"&gt;here&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;At the end of the talk, Andy Terrell asked a question about why this structured approach is necessary - why not just program the steps directly in a script?&lt;br /&gt;&lt;br /&gt;I agree that the system I presented does seem very 'heavyweight'. But it feels that doing the transformations directly loses some meta-information that would be useful to keep around, such as which transformations were applied at each step. Additionally, by storing the the pieces of the derivation in data structures, they are potentially easier to manipulate (and emphasizes that they can and should be programmatically manipulated).   However, Python's meta-tools are quite powerful, and could probably used to manipulate derivations written directly in a script.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Switching to a different issue, the presented example effectively inlines all the functions into the integral.  This is clearly not scalable in the face of larger and more complex expressions. The system needs some way to represent pieces that should transform into a function call in the generated code.  I have something working now, but it needs some clean-up work.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5063286-3328163449211454484?l=quantum_mc.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://quantum_mc.blogspot.com/feeds/3328163449211454484/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5063286&amp;postID=3328163449211454484' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5063286/posts/default/3328163449211454484'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5063286/posts/default/3328163449211454484'/><link rel='alternate' type='text/html' href='http://quantum_mc.blogspot.com/2011/09/video-of-scipy-2011-talk.html' title='Video of SciPy 2011 talk'/><author><name>Mark</name><uri>http://www.blogger.com/profile/03956296363343527391</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5063286.post-3649795890544356359</id><published>2011-06-07T07:32:00.003-05:00</published><updated>2011-06-07T22:39:53.387-05:00</updated><title type='text'>Modeling derivations: Questions and Answers</title><content type='html'>The past two posts (&lt;a href="http://quantum_mc.blogspot.com/2011/04/modeling-derivations.html"&gt;part I&lt;/a&gt; and &lt;a href="http://quantum_mc.blogspot.com/2011/04/example-of-modeling-derivations.html"&gt;part II&lt;/a&gt;) described a system (or style) for scientific programming that I've been working out.  This post will have more in a Q&amp;amp;A format (The questions are mostly ones I ask myself - perhaps it should better be called a 'rhetoric &amp;amp; rant' format) An abstract for a talk and paper was accepted to &lt;a href="http://conference.scipy.org/scipy2011/"&gt;SciPy 2011&lt;/a&gt;, so hopefully I can explain it clearly enough by then to get some feedback.&lt;br /&gt;&lt;br /&gt;&lt;ol&gt;&lt;li&gt; What is the target application? Goals?&lt;br /&gt;&lt;br /&gt;The target goals are better enabling algorithm research and development  (that is, writing a scientific code), and a flexibility to target  different runtime systems.&lt;br /&gt;&lt;br /&gt;Looking at the examples and case studies on various computer algebra system (CAS) websites, I  see many cases where the user modeled some system, solved it, and then  used the solution to improve or fix the system.  The hard part seems to  be modeling the system - this is not my target.  I'm interested in problems where the  second step is the hard part - and one needs to research new and better solvers.&lt;br /&gt;&lt;p&gt;I'm thinking in terms of a traditional scientific code, and how to automate parts of the development workflow.   One big issue is how to use a CAS to assist in the development.    Also I'm interested in problems that require high performance computing (HPC) - basically problems that will consume as much computing power and algorithm research as possible.  This likely means the code will need to be tuned and altered to support different target systems (multicore workstations, distributed memory parallel clusters, accelerators like GPU's, etc).&lt;br /&gt;&lt;/p&gt;&lt;br /&gt;&lt;/li&gt;&lt;li&gt;Why not use a compute algebra system directly?  It looks like you're creating a lot of extra work for yourself?&lt;br /&gt;&lt;p&gt;I would like a separation between the specification of an algorithm (for scientific computation, this is largely expressed in equations) and its implementation in the runtime system (along with an automated transformation from the spec to the final system).&lt;br /&gt;&lt;br /&gt;Typically a CAS is associated with full featured programming language, but implementing the algorithm in that language doesn't preserve this separation.&lt;br /&gt;&lt;br /&gt;As a concrete example, a CAS typically includes facilities for performing numerical integration.   What if I want to develop a new numerical integration method - are there any examples on how a CAS can be used to do that?&lt;br /&gt;&lt;br /&gt;Another issue with implementing HPC-style problems in a CAS is what happens when the existing solvers in the CAS are too slow, or the CAS system language is too slow (eg, how to scale to large parallel systems). The CAS may do a great deal of work for you, but what happens when you want to move past it? This is the part where code generation comes in.&lt;br /&gt;&lt;/p&gt;&lt;/li&gt;&lt;li&gt;What is the role of code generation in this system?&lt;br /&gt;&lt;p&gt; More generally, the 'code generation' step is the 'transformation to the target runtime system' step.  The transformation may be trivial, if the final equations can be solved by the CAS facilities, but I'm anticipating the need to ultimately target C/C++ or Fortran.&lt;br /&gt;&lt;/p&gt;Also, it seems useful to introduce this method in small pieces into an existing code (converting an entire code would usually be too dramatic of a change to be successful).    It would smooth the transition for the generated code to fit the style of the existing code. A template system for generation would be a useful approach.  A text-oriented (or basic token oriented system, like the C pre-processor) would work, but they have problems.  A system oriented around an actual parse tree of the target language would allow the most powerful transformations.&lt;br /&gt;&lt;br /&gt;&lt;/li&gt;&lt;br /&gt;&lt;li&gt;Is this related to reproducible research in any way?&lt;br /&gt;&lt;p&gt;Packages for &lt;a href="http://reproducibleresearch.net/index.php/Main_Page"&gt;reproducible research&lt;/a&gt; seem to be focused on the level of capturing parameters that are input to a scientific code, so that the results can be repeated and revisited later.&lt;br /&gt;Executing a program may be reproducible, but the construction of that program is not.&lt;br /&gt;&lt;br /&gt;Aside:&lt;br /&gt;Reproducibility can be achieved through documentation or automation.  The previous standard for scientific work depended primarily on documentation.   With computers, automation becomes possible as a working method. (For space reasons, this analysis is very simplistic --- there is more to it.)&lt;br /&gt;&amp;lt;/aside&amp;gt;&lt;br /&gt;&lt;br /&gt;This work is intended to make the construction of a code automated. One advantage is in making corrections to mistakes in the derivation -  fix it, push a button, and the final code is automatically updated.&lt;br /&gt;&lt;br /&gt;This should be a complementary to other systems for reproducible research.&lt;/p&gt;&lt;/li&gt;&lt;li&gt;Why are you doing this?&lt;br /&gt;I'm tired of tracking down missing minus signs and misplaced factors of 2 in my code.  A significant feature of this approach is that the entire chain of derivation and generation of the  program is performed by machine, to eliminate transcription errors. (If this sounds too rosy, rest assured there are plenty of other types of errors to make).&lt;br /&gt;&lt;/li&gt;&lt;/ol&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5063286-3649795890544356359?l=quantum_mc.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://quantum_mc.blogspot.com/feeds/3649795890544356359/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5063286&amp;postID=3649795890544356359' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5063286/posts/default/3649795890544356359'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5063286/posts/default/3649795890544356359'/><link rel='alternate' type='text/html' href='http://quantum_mc.blogspot.com/2011/06/modeling-derivations-questions-and.html' title='Modeling derivations: Questions and Answers'/><author><name>Mark</name><uri>http://www.blogger.com/profile/03956296363343527391</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5063286.post-5931278161279784453</id><published>2011-04-23T23:19:00.002-05:00</published><updated>2011-04-24T00:27:08.208-05:00</updated><title type='text'>Example of modeling derivations</title><content type='html'>The &lt;a href="http://quantum_mc.blogspot.com/2011/04/modeling-derivations.html"&gt;last post&lt;/a&gt; discussed a style of scientific programming that modeled derivations symbolically to create a machine-checked chain from starting equation to final code.&lt;br /&gt;&lt;p/&gt;&lt;br /&gt;This post will provide an example using the configuration integral for the canonical ensemble in statistical mechanics.   I want to evaluate the integral using various methods, starting with grid-based integration methods.   Using a grid-based method suffers from the curse of dimensionality, where adding particles raises the time to compute exponentially (which is why Monte Carlo methods are normally used).   However, it can still be useful to check Monte Carlo codes with other integration methods for small particle numbers.  Also, the free energy (and all associated quantities) is computed directly, where it is more difficult to compute with MC methods.    Finally, I'm curious as to how large of a system could be computed on today's hardware.&lt;br /&gt;&lt;p/&gt;&lt;br /&gt;&lt;a href="http://sympy.org/index.html"&gt;Sympy&lt;/a&gt; is the computer algebra system I'm using.   The code for this example is available on github in the &lt;a href="https://github.com/markdewing/sympy/tree/derivation_modeling/sympy/prototype"&gt;derivation_modeling branch&lt;/a&gt;, in the prototype subdirectory.&lt;br /&gt;&lt;p/&gt;&lt;br /&gt;The output (MathML and generated python) can be seen &lt;a href="http://www.markdewing.com/derivation_modeling/index.html"&gt;here&lt;/a&gt;.&lt;br /&gt;&lt;p/&gt;&lt;br /&gt;The flow is as follows:&lt;br /&gt;&lt;ol&gt;&lt;br /&gt;&lt;li&gt;Derive the composite trapezoidal rule, starting from the expression for a single interval&lt;/li&gt;&lt;br /&gt;&lt;li&gt; Generate code for the composite trapezoidal rule&lt;/li&gt;&lt;br /&gt;&lt;li&gt; Start from the configuration integral (which I've called the partition function in the documents) and transform it by specializing various parameters - 2 particles in 2 spatial dimensions, using the Lennard-Jones interaction potential, etc - until it becomes completely specified numerically.&lt;/li&gt;&lt;br /&gt;&lt;li&gt; Generate code that evaluates this integral using the generated integration code from step 2&lt;/li&gt;&lt;br /&gt;&lt;/ol&gt;&lt;br /&gt;&lt;br /&gt;There's still a tremendous amount of work to do on this, but hopefully an outline of this style of programming is visible from the example.&lt;br /&gt;&lt;br /&gt;&lt;p/&gt;&lt;br /&gt;&lt;ul&gt;&lt;br /&gt;&lt;li&gt;The MathML pages have a lot of detailed small steps - it would be nice to have a collapsible hierarchy so all the little steps can be hidden. &lt;/li&gt;&lt;br /&gt;&lt;li&gt; Some abstractions should remain during the steps - in particular the potential. The expression for the integrand can get quite messy from explicitly inserting the expression for the potential (and this is a simple case - more complex potentials would make it unreadable).&lt;/li&gt;&lt;br /&gt;&lt;li&gt;More backends for the code generation - C/C++ is the obvious choice in pursuit of higher performance. (The generated python can be run through Shed Skin, for another route to C++).  Converting to Theano expressions might be a quick way to try it out on the GPU.&lt;/li&gt;&lt;br /&gt;&lt;/ul&gt;&lt;br /&gt;&lt;p/&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5063286-5931278161279784453?l=quantum_mc.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://quantum_mc.blogspot.com/feeds/5931278161279784453/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5063286&amp;postID=5931278161279784453' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5063286/posts/default/5931278161279784453'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5063286/posts/default/5931278161279784453'/><link rel='alternate' type='text/html' href='http://quantum_mc.blogspot.com/2011/04/example-of-modeling-derivations.html' title='Example of modeling derivations'/><author><name>Mark</name><uri>http://www.blogger.com/profile/03956296363343527391</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5063286.post-2414359285765998454</id><published>2011-04-07T01:55:00.002-05:00</published><updated>2011-04-07T03:32:46.570-05:00</updated><title type='text'>Modeling derivations</title><content type='html'>A &lt;a href="http://quantum_mc.blogspot.com/2006/06/qmc-derivation-notes.html"&gt;previous post&lt;/a&gt; describes how I kept reference versions of important derivations in a document.  I would like to move the idea out of LaTeX and into some format more amenable to machine checking.  To do this requires some structure for describing and modeling a derivation.   &lt;br /&gt;&lt;p&gt;&lt;br /&gt;A derivation starts with some base equation, then proceeds through a series of steps transforming it into a form that can be solved numerically (A symbolic/analytic solution would be nice, but not possible in most cases.)    The steps can be divided into three categories&lt;br /&gt;&lt;/p&gt;&lt;br /&gt;&lt;ol&gt;&lt;br /&gt;&lt;li&gt;Exact transformations - rearranging terms, replacing an expression with a different form, the usual steps involved in a proof, etc&lt;/li&gt;&lt;br /&gt;&lt;li&gt;Approximations - using a truncated series expansion, replacing a derivative with discretized version, etc.&lt;/li&gt;&lt;br /&gt;&lt;li&gt;Specializations - Specifying the physical or model parameters in order to make the equation numerically solvable - like the number of spatial dimensions, number of particles, interaction potentials, etc.&lt;/li&gt;&lt;br /&gt;&lt;/ol&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;&lt;br /&gt;At the end of the derivation, the result can be evaluated numerically using the CAS (Computer Algebra System - I assume this derivation modeling has been implemented using one) facilities, if simple enough.  More complex or time-consuming results (a more likely case) can be further transformed by code generation to C/Fortran (or some other execution system).&lt;br /&gt;&lt;/p&gt;&lt;br /&gt;&lt;p&gt;&lt;br /&gt;One important feature of this workflow is every step in creating the program is checked by machine.  This should greatly reduce transcription errors (dropped minus signs and factors of 2 - this is what started the whole project in the first place).  Also it moves part of the process of creating scientific programs into the realm of 'ordinary software', and as such makes it subject to normal software engineering techniques - unit testing, etc.   Testing scientific (numerical) software is a difficult problem - this should help make it (a little) easier and more reliable.&lt;br /&gt;&lt;/p&gt;&lt;br /&gt;Some other work I've run across related to describing mathematics:&lt;br /&gt;&lt;ul&gt;&lt;br /&gt; &lt;li&gt;&lt;a href="http://en.wikipedia.org/wiki/Structured_derivations"&gt;Structured derivations&lt;/a&gt; were developed for teaching proof in high school mathematics.&lt;/li&gt;&lt;br /&gt; &lt;li&gt;&lt;a href="http://www.omdoc.org/"&gt;OMDoc&lt;/a&gt; is a markup language for describing mathematical structures at a higher level than a single formula (a proof, for instance)&lt;/li&gt;&lt;br /&gt;&lt;br /&gt;&lt;/ul&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5063286-2414359285765998454?l=quantum_mc.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://quantum_mc.blogspot.com/feeds/2414359285765998454/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5063286&amp;postID=2414359285765998454' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5063286/posts/default/2414359285765998454'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5063286/posts/default/2414359285765998454'/><link rel='alternate' type='text/html' href='http://quantum_mc.blogspot.com/2011/04/modeling-derivations.html' title='Modeling derivations'/><author><name>Mark</name><uri>http://www.blogger.com/profile/03956296363343527391</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5063286.post-268864206641432128</id><published>2009-08-27T00:19:00.000-05:00</published><updated>2009-08-27T00:20:09.770-05:00</updated><title type='text'>Levy constrained search in VMC?</title><content type='html'>The Levy constrained search formalism is a useful way to reason about density functional theory.  It finds the minimum energy using two nested searches.  The inner search seeks the minimum energy wavefunction for a particular density. The outer search seeks the density with the minimum energy.&lt;br /&gt;&lt;br /&gt;This could be directly implemented using VMC.  The main ingredient is energy minimization subject to a density constraint.  Has anyone done this?&lt;br /&gt;&lt;br /&gt;It wouldn't be very efficient compared to optimizing the VMC energy directly, but it would make an interesting connection between the methods.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5063286-268864206641432128?l=quantum_mc.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://quantum_mc.blogspot.com/feeds/268864206641432128/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5063286&amp;postID=268864206641432128' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5063286/posts/default/268864206641432128'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5063286/posts/default/268864206641432128'/><link rel='alternate' type='text/html' href='http://quantum_mc.blogspot.com/2009/08/levy-constrained-search-in-vmc.html' title='Levy constrained search in VMC?'/><author><name>Mark</name><uri>http://www.blogger.com/profile/03956296363343527391</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5063286.post-1877051334025722645</id><published>2008-12-14T14:49:00.002-06:00</published><updated>2008-12-16T00:10:27.208-06:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='programming'/><title type='text'>Why scientific computations fail</title><content type='html'>(I was busy this fall with another project.  Now it's time to return to scientific programming)&lt;br /&gt;&lt;p&gt;&lt;br /&gt;The &lt;a href="http://quantum_mc.blogspot.com/2008/07/assessing-correctness-of-scientific.html"&gt;previous post&lt;/a&gt; covered several levels of tests for assessing the correctness of scientific computation.  Now let us look at reasons why the results might not match what is expected.&lt;br /&gt;&lt;p&gt;&lt;br /&gt;&lt;ol&gt;&lt;br /&gt;&lt;li&gt;Programming errors&lt;br /&gt;&lt;li&gt;Mistakes in derivation and transcription of equations&lt;br /&gt;&lt;li&gt;Violations of assumptions or conventions&lt;br /&gt;&lt;li&gt;Errors from floating point&lt;br /&gt;&lt;li&gt;Errors and undesirable behavior from the algorithm (often problem-dependent)&lt;br /&gt;  &lt;ul&gt;&lt;br /&gt;   &lt;li&gt; Algorithms that have been well-studied by numerical analysts &lt;br /&gt;   &lt;li&gt; Those that have not&lt;br /&gt;  &lt;/ul&gt;&lt;br /&gt;&lt;/ol&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;&lt;br /&gt;&lt;h3&gt;Programming errors&lt;/h3&gt;&lt;br /&gt;The usual sorts of problems in programs (array indices, memory problems, etc).   This category of problems can be tested with unit tests and can make use of tools and practices from mainstream software engineering.&lt;br /&gt;&lt;p&gt;&lt;br /&gt;&lt;h3&gt;Mistakes in derivation and transcription of equations&lt;/h3&gt;&lt;br /&gt;This is similar to the implementation not matching the specification in traditional software engineering.  With scientific computation, though, the "specification" could be more precise in principle (equations and algorithms), and computer algebra systems could aid with performing and verifying steps in the derivation.&lt;br /&gt;&lt;p&gt;&lt;br /&gt;&lt;h3&gt;Violations of assumptions or conventions&lt;/h3&gt;&lt;br /&gt;Usually happens during derivation of the equations.  A stronger connection between the derivation and the final code might help this.&lt;br /&gt;&lt;p&gt;&lt;br /&gt;&lt;h3&gt;Errors and instabilities from floating point&lt;/h3&gt;&lt;br /&gt;Accumulated round-off, loss of precision from subtracting nearly equal numbers, and other problems. For more subtleties than you every wanted to know about, visit &lt;a href="http://www.cs.berkeley.edu/~wkahan/"&gt;W. Kahan's site&lt;/a&gt;.&lt;br /&gt;One of the most annoying parts about floating point is lack of good model for understanding (and analyzing) floating point errors.  I will return to this issue in a future post.&lt;br /&gt;&lt;p&gt;&lt;br /&gt;&lt;h3&gt;Errors and instabilities from the algorithm.&lt;/h3&gt;&lt;br /&gt;This category might be better divided into two subcategories - algorithms that have been well-studied by numerical analysts (like matrix operations, certain ODE's and PDE's, optimization), and those that have not.   Many algorithms have been well-studied and have nice packages available to use as black-boxes.  However, most scientific programs are a composition of well-known algorithms along with some problem-dependent features as well.&lt;br /&gt;&lt;br/&gt;&lt;br /&gt;Often times the behavior of the algorithm depends on the details of the physical system (ie, is it a metal or insulator)? &lt;br /&gt;&lt;br/&gt;&lt;br /&gt;This category also includes science-based and numerical approximations.&lt;br /&gt;&lt;br /&gt;&lt;p&gt;&lt;br /&gt;Now, how do we go from test case failure to deciding which of these categories the problem falls into (and then, of course, to locating the precise problem)?&lt;br /&gt;&lt;ul&gt;&lt;br /&gt;&lt;li&gt;Unit testing will help with the first category.  But not so much with the rest. Unit testing is helpful when you want to make sure things haven't changed. The hard part is getting it right the first time.&lt;br /&gt;&lt;li&gt;The different levels of tests in the previous post should give some insight into which category the problem might occur.&lt;br /&gt;&lt;/ul&gt;&lt;br /&gt;&lt;br /&gt;First I want to look at various models of floating point error and see if we can gain some understanding of the intrinsic uncertainty in a calculation.  This seems to be a necessary prerequisite for answering the question of 'how close is close enough?', in order to decide whether a test has actually failed or not.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5063286-1877051334025722645?l=quantum_mc.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://quantum_mc.blogspot.com/feeds/1877051334025722645/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5063286&amp;postID=1877051334025722645' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5063286/posts/default/1877051334025722645'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5063286/posts/default/1877051334025722645'/><link rel='alternate' type='text/html' href='http://quantum_mc.blogspot.com/2008/12/why-scientific-computations-fail.html' title='Why scientific computations fail'/><author><name>Mark</name><uri>http://www.blogger.com/profile/03956296363343527391</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5063286.post-8752188020074522512</id><published>2008-07-13T21:54:00.000-05:00</published><updated>2008-07-16T23:27:38.177-05:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='programming'/><title type='text'>Assessing the correctness of scientific computation</title><content type='html'>In the &lt;a href="http://quantum_mc.blogspot.com/2008/07/engineering-scientific-software.html"&gt;previous post&lt;/a&gt; I promised some thoughts on assessing the correctness of scientific computation.&lt;br /&gt;&lt;p&gt;&lt;br /&gt;Computational science programs are typically assessed with a series of test cases, ranging from order-of-magnitude estimates ("those numbers don't look right") to comparing with experimental data.  I've attempted to divide these test cases into categories, where each category shares similar expectations as to what 'close enough' means and has similar implications into potential causes for discrepancies.&lt;br /&gt;&lt;p&gt;&lt;br /&gt;&lt;br /&gt;&lt;ol&gt;&lt;br /&gt;&lt;li&gt;Order of magnitude estimates from general principles, back of the envelope calculations, or experience with similar problems.&lt;br /&gt;&lt;li&gt;Analytically solvable cases.&lt;br /&gt;&lt;li&gt;Small cases that are accurately solvable&lt;br&gt;For small systems, or simple cases, there are often multiple solution methods, and some of them are very accurate (or exact).  The methods can be compared for these small systems.   An important feature of this category is any approximations  can be controlled and the effects made arbitrarily small.&lt;br /&gt;&lt;li&gt;Results from the same (or similar) algorithm&lt;br&gt;Comparing the same system with the same algorithm should yield close results, but now there is additional uncertainty in the exact implementation, and the sensitivity to input precision (particularly when comparing results from a journal article)&lt;br /&gt;&lt;li&gt;Results from a different algorithm&lt;br&gt;This looks similar to the second category (comparing with exact or more precise algorithms), but this is the case where there a multiple methods (with different approximations) for handling larger systems.  There are likely to be more approximations (and probably uncontrolled approximations) involved.&lt;br&gt;&lt;br /&gt;(In electronic structure there is Hartree-Fock(HF), several post-HF methods, Density Functional Theory, and Quantum Monte Carlo.  And possibly a few others.) Now one has to deal with the all the above possibilities for two programs, rather than just one.&lt;br /&gt;&lt;li&gt;Experimental results&lt;br&gt;In some ways this is quite similar to the the previous category, except determining "sufficiently" close requires some understanding of the experimental uncertainties and corrections in addition to possible program errors.&lt;br /&gt;&lt;/ol&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;&lt;br /&gt;The testing process for each case involves running the test case, deciding whether the program result is 'close enough'.  If it is, proceed to the next test case.  If it is not, work to discover the cause of the discrepancy.  Next post I'll look at a list of possible causes.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5063286-8752188020074522512?l=quantum_mc.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://quantum_mc.blogspot.com/feeds/8752188020074522512/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5063286&amp;postID=8752188020074522512' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5063286/posts/default/8752188020074522512'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5063286/posts/default/8752188020074522512'/><link rel='alternate' type='text/html' href='http://quantum_mc.blogspot.com/2008/07/assessing-correctness-of-scientific.html' title='Assessing the correctness of scientific computation'/><author><name>Mark</name><uri>http://www.blogger.com/profile/03956296363343527391</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5063286.post-6670703497622424735</id><published>2008-07-12T01:20:00.002-05:00</published><updated>2008-07-12T01:43:23.064-05:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='programming'/><title type='text'>Engineering scientific software</title><content type='html'>Some pointers from Greg Wilson on engineering scientific software.&lt;br /&gt;&lt;p&gt;&lt;br /&gt;The &lt;a href="http://pyre.third-bit.com/blog/archives/1557.html"&gt;first pointer&lt;/a&gt; is to the &lt;a href="http://www.cse.msstate.edu/~SECSE08/index.htm"&gt;"First International Workshop on Software Engineering for Computational Science and Engineering"&lt;/a&gt;.&lt;br /&gt;&lt;p&gt;&lt;br /&gt;A couple of Wilson's short summaries of papers from this workshop &lt;br /&gt;(from &lt;a href="http://pyre.third-bit.com/blog/archives/1624.html"&gt;recent research reading&lt;/a&gt;)&lt;br /&gt;&lt;br /&gt;&lt;blockquote&gt;Diane Kelly and Rebecca Sanders: “Assessing the Quality of Scientific Software” (SE-CSE workshop, 2008). A short, useful summary of scientists’ quality assurance practices. As many people have noted, most commercial tools aren’t helpful when (a) cosmetic rearrangement of the code changes the output, and (b) the whole reason you’re writing a program is that you can’t figure out what the answer ought to be.&lt;br /&gt;&lt;/blockquote&gt;&lt;br /&gt;&lt;blockquote&gt;&lt;br /&gt;Judith Segal: “Models of Scientific Software Development”. Segal has spent the last few years doing field studies of scientists building software, and based on those has developed a model of their processes that is distinct in several ways from both classical and agile models.&lt;br /&gt;&lt;/blockquote&gt;&lt;br /&gt;&lt;p&gt;&lt;br /&gt;What I found interesting:&lt;br/&gt;&lt;br /&gt;Kelly and Sanders suggest that the split between verification and validation is not useful, and propose 'assessment' be used as an umbrella term.  (I will return to the point in a later post)&lt;br /&gt;&lt;p&gt;&lt;br /&gt;&lt;p&gt;&lt;br /&gt;The &lt;a href="http://pyre.third-bit.com/blog/archives/1559.html"&gt;second pointer&lt;/a&gt; is to the presentations at &lt;a href="http://www.tacc.utexas.edu/ta/ta_display.php?ta_id=100484"&gt;TACC Scientific Software Days&lt;/a&gt;. &lt;br /&gt;&lt;p&gt;&lt;br /&gt;One of the presentations there was by Greg Wilson himself on "HPC Considered Harmful". There is one slide on testing floating point code (slide 15).  In particular the bullet point testing against a tolerance is "superstition, not science". (And he's raised &lt;a href="http://www.computer.org/portal/site/cise/index.jsp?pageID=cise_level1_article&amp;TheCat=1001&amp;path=cise/2006/v8n6&amp;file=tech.xml"&gt;this point elsewhere&lt;/a&gt;)&lt;br /&gt;&lt;p&gt;&lt;br /&gt;This statement has bothered me since I first read it, and so the next few posts will explore some of context surrounding this question. The first post will list different methods for assessing the correctness of a program, the next post will categorize possible errors, and finally a post looking at 'close enough'.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5063286-6670703497622424735?l=quantum_mc.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://quantum_mc.blogspot.com/feeds/6670703497622424735/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5063286&amp;postID=6670703497622424735' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5063286/posts/default/6670703497622424735'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5063286/posts/default/6670703497622424735'/><link rel='alternate' type='text/html' href='http://quantum_mc.blogspot.com/2008/07/engineering-scientific-software.html' title='Engineering scientific software'/><author><name>Mark</name><uri>http://www.blogger.com/profile/03956296363343527391</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5063286.post-5934050125912119667</id><published>2008-05-29T22:23:00.000-05:00</published><updated>2008-05-29T22:24:19.773-05:00</updated><title type='text'>Computing an unbiased inverse</title><content type='html'>In a previous entry, &lt;a href="http://quantum_mc.blogspot.com/2007/08/reweighting-is-biased.html"&gt;Reweighting is biased&lt;/a&gt;, I had discussed the problem of a finite-sample size bias in reweighting.  In this entry I will investigate a possible solution.&lt;br /&gt;&lt;br /&gt;&lt;p&gt;&lt;br /&gt;But first, I had asked if this was known in the literature.  A comment by Lee Warren pointed to this article, &lt;a href="http://scitation.aip.org/getabs/servlet/GetabsServlet?prog=normal&amp;id=PLEEE8000073000005056706000001&amp;idtype=cvips&amp;gifs=yes"&gt; Population size bias in descendant-weighted diffusion quantum Monte Carlo simulations&lt;/a&gt;, which discusses this very issue (in a slightly different context, but the root issue is the same).  In that context the problem is even more severe since the straightforward solution (increase N) carries a heavier computational cost.&lt;br /&gt;&lt;p&gt;&lt;br /&gt;One of the crucial issues is finding a good estimator for the inverse (1/D).  The naive estimator (simply do the division) is biased.   So the question is: are there any other ways of performing division that could be used?   Yes, in digital arithmetic there are a couple of algorithms for division using only multiplication and addition - Newton-Raphson and Goldschmidt (see  the Wikipedia entry on &lt;a href="http://en.wikipedia.org/wiki/Division_(digital)"&gt;digital division&lt;/a&gt;)&lt;br /&gt;&lt;p&gt;&lt;br /&gt;In general, to have an unbiased estimator, each sample of the random variable must enter the estimator linearly (alternately, we can say each sample should only be used once and then discarded)&lt;br /&gt;&lt;p&gt;&lt;br /&gt;The Newton-Raphson iteration for the inverse (1/D) is x&lt;sub&gt;i+1&lt;/sub&gt; = x&lt;sub&gt;i&lt;/sub&gt;(2-D x&lt;sub&gt;i&lt;/sub&gt;).   To make this unbiased, in each iteration the value of D needs to be an independent sample, and the values of x&lt;sub&gt;i&lt;/sub&gt; from previous iterations also need to be computed from independent samples.   One can think of the algorithm forming a tree, with each iteration branching to two children (each child is one of the x&lt;sub&gt;i&lt;/sub&gt; computed by the previous iteration), until reaching the leaves representing the initial iteration (x&lt;sub&gt;0&lt;/sub&gt; = T&lt;sub&gt;1&lt;/sub&gt; + T&lt;sub&gt;2&lt;/sub&gt; D)&lt;br /&gt;&lt;p&gt;&lt;br /&gt;I tested this algorithm, and it appears to give unbiased results.   There is a catch, though. The result has a large variance.  Using the average of all the samples with the naive estimator yields a bias that is much smaller than the variance of the unbiased estimator (hence the mean squared error is a more appropriate metric for the combination of variance and bias)&lt;br /&gt;&lt;p&gt;&lt;br /&gt;Open questions/issues:&lt;br /&gt;&lt;ul&gt;&lt;br /&gt;&lt;li&gt; Is there some modification of the algorithm that will produce a smaller MSE than the naive estimator? Or even an MSE that isn't too much larger?&lt;/li&gt;&lt;br /&gt;&lt;li&gt; How many iterations are necessary - how to analyze the convergence of this stochastic Newton-Raphson iteration?&lt;/li&gt;&lt;br /&gt;&lt;li&gt; Try out the Goldschmidt algorithm.&lt;/li&gt;&lt;br /&gt;&lt;/ul&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5063286-5934050125912119667?l=quantum_mc.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://quantum_mc.blogspot.com/feeds/5934050125912119667/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5063286&amp;postID=5934050125912119667' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5063286/posts/default/5934050125912119667'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5063286/posts/default/5934050125912119667'/><link rel='alternate' type='text/html' href='http://quantum_mc.blogspot.com/2008/05/computing-unbiased-inverse.html' title='Computing an unbiased inverse'/><author><name>Mark</name><uri>http://www.blogger.com/profile/03956296363343527391</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5063286.post-2774220692253249455</id><published>2008-04-06T00:56:00.000-05:00</published><updated>2008-04-06T00:57:06.725-05:00</updated><title type='text'>Reproducible Research</title><content type='html'>There were a couple of recent posts on &lt;a href="http://pyre.third-bit.com/blog"&gt;Greg Wilsons's blog&lt;/a&gt; about reproducible research.  The &lt;a href="http://pyre.third-bit.com/blog/archives/1444.html"&gt;first&lt;/a&gt; is a pointer to a &lt;a href="http://www-stat.stanford.edu/%7Edonoho/Reports/1995/wavelab.pdf"&gt;paper&lt;/a&gt; about &lt;a href="http://www-stat.stanford.edu/%7Ewavelab/"&gt;WaveLab&lt;/a&gt;. The paper is from 1995, although it appears the philosophy hasn't changed much looking at a more recent (2005) introduction on the website.  The &lt;a href="http://pyre.third-bit.com/blog/archives/1457.html"&gt;second post&lt;/a&gt; contains a reference to the &lt;a href="http://rsf.sourceforge.net/Main_Page"&gt;Madagascar project&lt;/a&gt;.&lt;br /&gt;&lt;p&gt;&lt;br /&gt;These projects follow the work of &lt;a href="http://sepwww.stanford.edu/sep/jon/index.html"&gt;Jon Claerbout&lt;/a&gt; on &lt;a href="http://sepwww.stanford.edu/sep/jon/reproducible.html"&gt;Reproducible Research&lt;/a&gt;.&lt;br /&gt;&lt;p&gt;&lt;br /&gt;Thoughts&lt;br /&gt;&lt;ul&gt;&lt;br /&gt; &lt;li&gt; This work is all about designing a workflow for computational research, and creating tools to support that workflow.  Much of it seems quite banal, but part of the whole purpose of doing this is to free you from having to think about the boring and repetitious steps.&lt;br /&gt; &lt;li&gt; Levels of reproducibility&lt;br /&gt; &lt;ol&gt;&lt;br /&gt;    &lt;li&gt; Yourself, right away (when tweaking figures, for instance)&lt;/li&gt;&lt;br /&gt;    &lt;li&gt; Another research group member, or yourself 6 months later&lt;/li&gt;&lt;br /&gt;    &lt;li&gt; Someone in another group, (a) able to run the code and get the same results, and (b) able to understand the code&lt;/li&gt;&lt;br /&gt;    &lt;li&gt; Someone in another group, able to use your description to write their own code that gets the same results&lt;/li&gt;&lt;br /&gt; &lt;/ol&gt;&lt;br /&gt;  The last level is the gold standard in scientific reproducibility.   Experiments are reproduced from published descriptions (ideally, although the descriptions aren't always complete).  Or theorists rederive intermediate steps leading to a paper's conclusion.&lt;br&gt;&lt;br /&gt;  In software development, levels 1-3 are what counts.  (It's not very useful software development if others can't run your code and get expected results.). The last level is similar to multiple implementations of a standard (eg, C++ compilers from multiple vendors.)&lt;br /&gt; &lt;/li&gt;&lt;br /&gt; &lt;li&gt;The referenced works seem to focus mostly on processing of raw data (images, seismic imaging, etc) and the processing steps to produce a final result.&lt;br /&gt;&lt;p&gt;&lt;br /&gt;How would this apply in other fields? Say, ones with smaller input data sets, but much higher computational demands.&lt;br /&gt;&lt;p&gt;&lt;br /&gt;The Madagascar project, for example, uses SCons to coordinate the steps in producing research output.  What happens when one of the steps involves several weeks of supercomputer time?   Two immediate problems that spring to mind - one probably doesn't want this step launched without warning by the script.  Furthermore, the steps for launching such a job are likely to be very site-specific, making it difficult for others to reproduce elsewhere.&lt;br /&gt; &lt;/li&gt;&lt;br /&gt; &lt;li&gt; Somewhat related entries of mine: &lt;a href="http://quantum_mc.blogspot.com/2007/10/keeping-notes.htm"&gt;Keeping notes&lt;/a&gt; and &lt;a href="http://quantum_mc.blogspot.com/2005/04/solving-science-problems.html"&gt;Solving Science Problems&lt;/a&gt;&lt;br /&gt;&lt;/ul&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5063286-2774220692253249455?l=quantum_mc.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://quantum_mc.blogspot.com/feeds/2774220692253249455/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5063286&amp;postID=2774220692253249455' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5063286/posts/default/2774220692253249455'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5063286/posts/default/2774220692253249455'/><link rel='alternate' type='text/html' href='http://quantum_mc.blogspot.com/2008/04/reproducible-research.html' title='Reproducible Research'/><author><name>Mark</name><uri>http://www.blogger.com/profile/03956296363343527391</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5063286.post-2982315831203084213</id><published>2008-03-19T22:50:00.001-05:00</published><updated>2008-03-19T22:51:01.232-05:00</updated><title type='text'>Notes from PyCon 2008</title><content type='html'>I attended &lt;a href="http://us.pycon.org/2008/about/"&gt;PyCon 2008&lt;/a&gt; this past weekend, and had a good time meeting people in the Python commmunity.&lt;br /&gt;&lt;p&gt;&lt;br /&gt;Some notes&lt;br /&gt;&lt;ul&gt;&lt;br /&gt;&lt;li&gt; I tried to give a lightning (5 minute) talk about sympy and code generation. Unfortunately, Ubuntu 7.10 on my laptop (Dell Vostro) failed to display to the external output, so I was unable to present to the larger audience.  However, I was able to give the talk to the people at the science BOF session.  The slides are available &lt;a href="http://www.markdewing.com/code_gen/lightning-sympy-code-gen.pdf"&gt;here&lt;/a&gt;&lt;/li&gt; &lt;br /&gt;&lt;li&gt;At the science BOF session I met Michael Tobis, the author an interesting system called PyNSol.  It uses python to describe the differential equations, and generates Fortran for performance.&lt;/li&gt;&lt;br /&gt;&lt;li&gt; The python 2 to 3 converter looks interesting.  Not so much for the conversion of python versions, but for the infrastructure developed for the tool.&lt;/li&gt;&lt;br /&gt;&lt;li&gt;Enthought was showing off some multi-touch displays.  Being able to interact with 3D visualizations (and Google Earth) via gestures for zoom, pan, and rotation made for a nice demo.  The real question is if this type of display would be useful for actual use.&lt;/li&gt;&lt;br /&gt;&lt;/ul&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5063286-2982315831203084213?l=quantum_mc.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://quantum_mc.blogspot.com/feeds/2982315831203084213/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5063286&amp;postID=2982315831203084213' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5063286/posts/default/2982315831203084213'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5063286/posts/default/2982315831203084213'/><link rel='alternate' type='text/html' href='http://quantum_mc.blogspot.com/2008/03/notes-from-pycon-2008.html' title='Notes from PyCon 2008'/><author><name>Mark</name><uri>http://www.blogger.com/profile/03956296363343527391</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5063286.post-8478824507204440724</id><published>2008-03-17T20:34:00.000-05:00</published><updated>2008-03-17T20:34:58.183-05:00</updated><title type='text'>Code generation now uses templates</title><content type='html'>In Quameon, the derivatives for the Gaussian basis functions are computed with &lt;a href="http://code.google.com/p/sympy/"&gt;sympy&lt;/a&gt; and the python code is generated.  Creating the code that surrounds the generated code is a bit of a tedious procedure - the syntax tree needs to be constructed by hand.  But no more!   The surrounding code can now written in python and a parser (written using &lt;a href="http://pyparsing.wikispaces.com/"&gt;pyparsing&lt;/a&gt;) will create the syntax tree for you.&lt;br /&gt;&lt;p&gt;&lt;br /&gt;Some details:&lt;br/&gt;&lt;br /&gt;Identifiers surrounded by percent signs (eg %name%) get turned into a template node type for subsequent replacement.&lt;br /&gt;&lt;p&gt;&lt;br /&gt;Example template:&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;class %orb_name%:&lt;br /&gt;  def compute_value(self,alpha,v,r2):&lt;br /&gt;    x=v[0]&lt;br /&gt;    y=v[1]&lt;br /&gt;    z=v[2]&lt;br /&gt;    %value%&lt;br /&gt;    return val&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;The code replaces %orb_name% with the orbital name (s,px,py,px,etc) and %value% gets replaced with the expression for the value of the orbital (the methods for the derivatives not shown - see &lt;a href="https://quameon.svn.sourceforge.net/svnroot/quameon/trunk/codegen/primitive_gaussian/deriv.py"&gt;codegen/primitive_gaussian/deriv.py&lt;/a&gt; in SVN for the full template.)&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5063286-8478824507204440724?l=quantum_mc.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://quantum_mc.blogspot.com/feeds/8478824507204440724/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5063286&amp;postID=8478824507204440724' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5063286/posts/default/8478824507204440724'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5063286/posts/default/8478824507204440724'/><link rel='alternate' type='text/html' href='http://quantum_mc.blogspot.com/2008/03/code-generation-now-uses-templates.html' title='Code generation now uses templates'/><author><name>Mark</name><uri>http://www.blogger.com/profile/03956296363343527391</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5063286.post-5557967176633663015</id><published>2007-12-21T08:31:00.000-06:00</published><updated>2007-12-21T19:57:26.623-06:00</updated><title type='text'>Why python?</title><content type='html'>The author of the first comment on the &lt;a href="http://quantum_mc.blogspot.com/2007/12/quameon.html"&gt;Quameon&lt;/a&gt; entry wonders if Python will be too slow.&lt;br /&gt;&lt;p&gt;&lt;br /&gt;One reason to use Python is ease of programming.  Hopefully the advantages of programming in Python will outweigh the performance penalty.&lt;br /&gt;&lt;p&gt;&lt;br /&gt;However, at some point, runtime speed will be an issue.  Here's a list of steps to improve runtime performance (in increasing order of effort/expected return)&lt;br /&gt;&lt;ol&gt;&lt;br /&gt; &lt;li&gt; Use &lt;a href="http://psyco.sourceforge.net/"&gt;psyco&lt;/a&gt;.  Put "import psyco; pysco.full()" at  the beginning of your program and get an instant speed increase.&lt;br /&gt; &lt;li&gt; Use the &lt;a href="http://shed-skin.blogspot.com/"&gt;Shed-Skin&lt;/a&gt; Python to C++ compiler. (I haven't tried this yet - don't know if it works with Quameon.)&lt;br /&gt; &lt;li&gt; Profile and rewrite slow parts in C/C++/Fortran. I've done this with the inter-particle distance computation in a classical MC code in Python, and gained some performance.&lt;br /&gt; &lt;li&gt; Code generation.   Right now, the code for the Gaussian basis functions is auto-generated (no more computing derivatives by hand!!).  I would like to move more of the basic formulas to this technique.  Then it should be easier to retarget the code generation to another language (in theory, I haven't tried it yet).&lt;br /&gt;&lt;/ol&gt;&lt;br /&gt;&lt;p&gt;&lt;br /&gt;Other tidbits:&lt;br&gt;&lt;br /&gt;Monte Python uses Python and C++ for QMC (&lt;a href="http://arxiv.org/abs/physics/0609191"&gt;paper&lt;/a&gt;, &lt;a href="http://code.google.com/p/montepython/"&gt;code&lt;/a&gt;). They wrote the time-consuming parts in C++, and use Python to glue it all together.  The algorithm variants they tested (parallel distribution strategies for DMC) were achieved through changing the Python part of the code.&lt;br /&gt;&lt;p&gt;&lt;br /&gt;Code generation could potentially result in *faster* code than writing a general framework in C++ or Fortran.  This is because the code can be specialized for a given physical system, exposing more  optimization opportunities.  For an example of code generation, look at the development SVN area of &lt;a href="http://pyquante.sourceforge.net/"&gt;PyQuante&lt;/a&gt; - there is a program that will produce a C++ program to compute the energy for a molecule given in the input file.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5063286-5557967176633663015?l=quantum_mc.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://quantum_mc.blogspot.com/feeds/5557967176633663015/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5063286&amp;postID=5557967176633663015' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5063286/posts/default/5557967176633663015'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5063286/posts/default/5557967176633663015'/><link rel='alternate' type='text/html' href='http://quantum_mc.blogspot.com/2007/12/why-python.html' title='Why python?'/><author><name>Mark</name><uri>http://www.blogger.com/profile/03956296363343527391</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5063286.post-2352943008577412083</id><published>2007-12-05T23:32:00.001-06:00</published><updated>2007-12-06T00:00:46.440-06:00</updated><title type='text'>Quameon</title><content type='html'>I've been working on a Quantum Monte Carlo code implemented in Python.  It's called "Quameon" (the name is a mixture of letters from "Quantum Monte Carlo in Python"). There's a SourceForge project for it - here are links to the &lt;a href="http://sourceforge.net/projects/quameon"&gt; SourceForge project page&lt;/a&gt;, the &lt;a href="http://quameon.sourceforge.net/"&gt;project web page&lt;/a&gt;, and the &lt;a href="http://quameon.wiki.sourceforge.net/"&gt;project wiki&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;The code doesn't do much currently, but I mention the project now so I can write blog entries about various aspects of getting the code working.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;I'm currently trying to validate that the code works by using HF single particle orbitals (obtained from &lt;a href="http://pyquante.sourceforge.net/"&gt;PyQuante&lt;/a&gt;) and no jastrow factor - this should reproduce the HF energy.  It seems to work for a few atoms (He, Be, C), after sorting out some normalization issues with the basis sets (apparently all basis sets are not normalized - this doesn't affect the energy, but does affect the eigenvector coefficients).  I will need longer runs to be sure.  The next step is to profile the code to look for any quick and easy performance tuning opportunities.&lt;br /&gt;&lt;br /&gt;The first target (after getting the code running reliably) is to implement several forms for jastrow factors and several VMC parameter optimization algorithms.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5063286-2352943008577412083?l=quantum_mc.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://quantum_mc.blogspot.com/feeds/2352943008577412083/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5063286&amp;postID=2352943008577412083' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5063286/posts/default/2352943008577412083'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5063286/posts/default/2352943008577412083'/><link rel='alternate' type='text/html' href='http://quantum_mc.blogspot.com/2007/12/quameon.html' title='Quameon'/><author><name>Mark</name><uri>http://www.blogger.com/profile/03956296363343527391</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5063286.post-9045888774469872430</id><published>2007-10-04T22:38:00.000-05:00</published><updated>2007-10-04T22:38:22.660-05:00</updated><title type='text'>Keeping notes</title><content type='html'>Keeping a record of work is important for research.  I use two main tools for this purpose.  First, a text file with entries in chronological order (one file per month, with names like "Sept2007").  I write the date and then start taking notes for that day in the file.&lt;br /&gt;&lt;ul&gt;&lt;br /&gt;&lt;li&gt;Pro - easy to use, chronological view easily available&lt;br /&gt;&lt;li&gt;Con - math hard to write well, ideas spread over several days hard to view topically.&lt;br /&gt;&lt;/ul&gt;&lt;br /&gt;&lt;br /&gt;The other tool I use is a wiki. It's useful to keep data in a structured, hierarchical format that's easy to edit.&lt;br /&gt;&lt;ul&gt;&lt;br /&gt;&lt;li&gt;Pro - ideas arranged topically, can do better looking math&lt;br /&gt;&lt;li&gt;Con - must work topically from the start, no good chronological view (Yes, I know you can view changes in order, but it's not as easy to reconstruct what I was thinking on a particular day.)&lt;br /&gt;&lt;/ul&gt;&lt;br /&gt;&lt;br /&gt;I want a single tool that does both of these - that can view the notes both chronologically and by topic.&lt;br /&gt;For work-flow, I want the ability to enter ideas and notes free-form, and perform categorization and annotation at a separate time.&lt;br /&gt;&lt;br /&gt;Another additional feature that would be nice is recording other actions on the system (at least by reference).&lt;br /&gt;One example is check-ins to source control.&lt;br /&gt;&lt;br /&gt;Another possible example - What if gnuplot were to record all the commands issued (and kept a copy of all the files used?)  Graphs could be re-created and played back at a later date easily.&lt;br /&gt;&lt;br /&gt;I looked around a little bit to see if there are other applications that might meet some of these requirements (or at least be an improvement over text files and a wiki).  One class of app is a note taking application.  I looked at Tomboy.  It does have a Latex plugin (though I could not get it to work).  Latex side-rant:  It's great for making nice looking mathematics, but you wind up with "equations under glass". It's pretty to look at, but you can't manipulate it further.  For mathematical content, I want something with more precise semantics (Content MathML, for example)&lt;br /&gt;&lt;br /&gt;Another class of tool is mind mapping software.  I looked at Vym (View your mind) briefly, but I don't think I will like this type of software.  Viewing a graph of links is nice, but not as the main working view - I prefer a wiki view (pages with links)&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5063286-9045888774469872430?l=quantum_mc.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://quantum_mc.blogspot.com/feeds/9045888774469872430/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5063286&amp;postID=9045888774469872430' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5063286/posts/default/9045888774469872430'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5063286/posts/default/9045888774469872430'/><link rel='alternate' type='text/html' href='http://quantum_mc.blogspot.com/2007/10/keeping-notes.html' title='Keeping notes'/><author><name>Mark</name><uri>http://www.blogger.com/profile/03956296363343527391</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5063286.post-4813553482472688657</id><published>2007-08-19T21:56:00.000-05:00</published><updated>2007-08-19T22:28:22.894-05:00</updated><title type='text'>Black Box Reweighting</title><content type='html'>In the &lt;a href="http://quantum_mc.blogspot.com/2007/08/reweighting-is-biased.html"&gt;last post&lt;/a&gt;, I wondered whether the black box reweighting method might help with the bias.&lt;br /&gt;&lt;p&gt;&lt;br /&gt;The &lt;a href="http://arxiv.org/abs/physics/0609194"&gt;Black Box Reweighting&lt;/a&gt; (BBRW) method computes weights using the observed distribution of samples, rather than the targeted distribution. (The &lt;a href="http://www.ccbb.pitt.edu/Professor_Websites/Zuckerman/index.html"&gt;author's website&lt;/a&gt; contains a link to supplementary material with further discussion.)&lt;br /&gt;&lt;p&gt;&lt;br /&gt;I ran a simple test, and the bias was slightly worse with the BBRW method, compared to standard reweighting.&lt;br /&gt;&lt;p&gt;&lt;br /&gt;The BBRW method does a fine job of solving the problem the authors intended (correct handling of a distribution that may be incompletely sampled, and lower variance of the result - the lower variance of the result was apparent in my tests), but it doesn't solve the reweighting bias issue.&lt;br /&gt;&lt;p&gt;&lt;br /&gt;The search for a method to correct reweighting bias continues...&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5063286-4813553482472688657?l=quantum_mc.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://quantum_mc.blogspot.com/feeds/4813553482472688657/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5063286&amp;postID=4813553482472688657' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5063286/posts/default/4813553482472688657'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5063286/posts/default/4813553482472688657'/><link rel='alternate' type='text/html' href='http://quantum_mc.blogspot.com/2007/08/black-box-reweighting.html' title='Black Box Reweighting'/><author><name>Mark</name><uri>http://www.blogger.com/profile/03956296363343527391</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5063286.post-499794093700811754</id><published>2007-08-14T22:52:00.000-05:00</published><updated>2007-08-14T22:47:30.901-05:00</updated><title type='text'>Reweighting is biased</title><content type='html'>The reweighting technique, where samples from one probability distribution are adjusted with a weight factor to compute averages from a different (but usually very similar) distribution, is biased for a finite number of samples.&lt;br /&gt;&lt;br /&gt;The details can be found &lt;a href="http://www.markdewing.com/qmc/reweighting/reweight_bias.pdf"&gt;here&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Question for the audience: Is this known? I don't recall seeing this mentioned any time the method has been presented.&lt;br /&gt;&lt;br /&gt;Some possible routes to fix the problem are listed in the paper, but alas, I haven't been able to turn any of them into a useful solution yet.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5063286-499794093700811754?l=quantum_mc.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://quantum_mc.blogspot.com/feeds/499794093700811754/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5063286&amp;postID=499794093700811754' title='8 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5063286/posts/default/499794093700811754'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5063286/posts/default/499794093700811754'/><link rel='alternate' type='text/html' href='http://quantum_mc.blogspot.com/2007/08/reweighting-is-biased.html' title='Reweighting is biased'/><author><name>Mark</name><uri>http://www.blogger.com/profile/03956296363343527391</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>8</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5063286.post-2492205371699069097</id><published>2007-08-10T22:29:00.000-05:00</published><updated>2007-08-10T22:56:15.992-05:00</updated><title type='text'>VMC optimization papers</title><content type='html'>A recent &lt;a href="ttp://quantum_mc.blogspot.com/2007/03/useful-paper-for-vmc-optimization.html#5505554687116463571"&gt;comment&lt;/a&gt; suggested these papers on VMC optimization:&lt;br /&gt;&lt;ul&gt;&lt;br /&gt;&lt;li&gt;&lt;a href="http://arxiv.org/abs/cond-mat/0611094v2"&gt;Alleviation of the Fermion-sign problem by optimization of many-body wave functions&lt;/a&gt;&lt;/li&gt;&lt;br /&gt;&lt;li&gt;&lt;a href="http://www.arxiv.org/abs/cond-mat/0502553v2"&gt;Wave function optimization in the variational Monte Carlo method&lt;/a&gt;&lt;/li&gt;&lt;br /&gt;&lt;/ul&gt;&lt;br /&gt;&lt;br /&gt;I'd also add these to the pile of papers to read and understand:&lt;br /&gt;&lt;br /&gt;&lt;ul&gt;&lt;br /&gt;&lt;li&gt;&lt;a href="http://arxiv.org/abs/physics/0701039v2"&gt;Optimization of quantum Monte Carlo wave functions by energy minimization&lt;/a&gt;&lt;/li&gt;&lt;br /&gt;&lt;li&gt;&lt;a href="http://www.arxiv.org/abs/cond-mat/0511278v1"&gt;A simple and efficient approach to the optimization of correlated wave functions&lt;/a&gt;&lt;/li&gt;&lt;br /&gt;&lt;/ul&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;&lt;br /&gt;And since this post is alread about VMC optimization, some further questions:&lt;br /&gt;&lt;ol&gt;&lt;br /&gt;&lt;li&gt; What about simultaneous geometry and parameter optimization?&lt;/li&gt;&lt;br /&gt;&lt;li&gt; The focus seems to be on single geometries - what's likely more interesting in the future is a family of geometries - has anyone parameterized the VMC parameters (by the bond lengths or nuclear coordinates)?&lt;/li&gt;&lt;br /&gt;&lt;/ol&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5063286-2492205371699069097?l=quantum_mc.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://quantum_mc.blogspot.com/feeds/2492205371699069097/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5063286&amp;postID=2492205371699069097' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5063286/posts/default/2492205371699069097'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5063286/posts/default/2492205371699069097'/><link rel='alternate' type='text/html' href='http://quantum_mc.blogspot.com/2007/08/vmc-optimization-papers.html' title='VMC optimization papers'/><author><name>Mark</name><uri>http://www.blogger.com/profile/03956296363343527391</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5063286.post-8522992247457843063</id><published>2007-08-10T21:09:00.000-05:00</published><updated>2007-08-10T21:53:18.842-05:00</updated><title type='text'>Correct estimators in DMC without forward walking?</title><content type='html'>Computing properties other than the energy using Diffusion Monte Carlo requires forward walking to get correct answers.   That may change, if this paper - &lt;a href="http://arxiv.org/abs/0708.0542v1"&gt;Hellman-Feynman operator sampling in Diffusion Monte Carlo calculations&lt;/a&gt; - is correct.&lt;br /&gt;&lt;p&gt;&lt;br /&gt;Although as I look at the paper more, the technique doesn't look any easier than the forward walking implementation by Casulleras and Boronat (the paper does mention this similarity).  It appears to use similar data in a different combination.  I would be interested to see how the noise, bias, and stability characteristics compare.&lt;br /&gt;&lt;p&gt;&lt;br /&gt;The Hellman-Feynman theorem seems to be getting lots of attention in the QMC world recently.   It's also been used to construct Zero-Variance Zero-Bias estimators (most recently example &lt;a href="http://arxiv.org/abs/0705.0721v2"&gt;here&lt;/a&gt;).&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5063286-8522992247457843063?l=quantum_mc.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://quantum_mc.blogspot.com/feeds/8522992247457843063/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5063286&amp;postID=8522992247457843063' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5063286/posts/default/8522992247457843063'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5063286/posts/default/8522992247457843063'/><link rel='alternate' type='text/html' href='http://quantum_mc.blogspot.com/2007/08/correct-estimators-in-dmc-without.html' title='Correct estimators in DMC without forward walking?'/><author><name>Mark</name><uri>http://www.blogger.com/profile/03956296363343527391</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5063286.post-5639242735566999595</id><published>2007-08-02T22:35:00.000-05:00</published><updated>2007-08-03T22:38:56.695-05:00</updated><title type='text'>Gravitational N-body and the Art of Computational Science</title><content type='html'>A rather ambitious project to describe a gravitional N-body code and how to write it in Ruby: &lt;a href="http://www.artcompsci.org/kali/development.html"&gt;The Art of Computational Science&lt;/a&gt;&lt;br /&gt;&lt;p&gt;&lt;br /&gt;As Greg Wilson  &lt;a href="http://pyre.third-bit.com/blog/archives/1058.html"&gt; points out&lt;/a&gt;, something like this would be nice to have in Python.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5063286-5639242735566999595?l=quantum_mc.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://quantum_mc.blogspot.com/feeds/5639242735566999595/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5063286&amp;postID=5639242735566999595' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5063286/posts/default/5639242735566999595'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5063286/posts/default/5639242735566999595'/><link rel='alternate' type='text/html' href='http://quantum_mc.blogspot.com/2007/08/gravitational-n-body-and-art-of.html' title='Gravitational N-body and the Art of Computational Science'/><author><name>Mark</name><uri>http://www.blogger.com/profile/03956296363343527391</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5063286.post-2281758017913198005</id><published>2007-03-17T23:51:00.000-05:00</published><updated>2007-03-17T23:43:34.963-05:00</updated><title type='text'>Efficient Global Optimization</title><content type='html'>The optimization method mentioned &lt;a href="http://quantum_mc.blogspot.com/2007/03/useful-paper-for-vmc-optimization.html"&gt;last post&lt;/a&gt; is an improvement on Efficient Global Optimization, presented in the paper &lt;a href="http://www.springerlink.com/content/m5878111m101017p/"&gt;Efficient Global Optimization of ExpensiveBlack-Box Functions&lt;/a&gt; (also available from on one of the &lt;a href="http://www.schonlau.net/"&gt;author's websites&lt;/a&gt;)&lt;br /&gt;&lt;br&gt;&lt;br /&gt;Another paper listed in the references, &lt;a href="http://portal.acm.org/citation.cfm?coll=GUIDE&amp;dl=GUIDE&amp;id=596412"&gt;A Taxonomy of Global Optimization Methods Based on Response Surfaces&lt;/a&gt;(by D. R. Jones, one of the authors on the EGO paper) is a nice overview of various optimization methods.  It presents each method and gives ways in which it can be fooled into choosing the wrong point as the optimum.  A fix is given, which then leads to the next method in the list.&lt;br /&gt;&lt;br&gt;&lt;br /&gt;One of the core ideas is regression based on Gaussian processes (kriging).   To learn more about Gaussian processes, see &lt;a href="http://www.gaussianprocess.org/"&gt;www.gaussianprocess.org&lt;/a&gt;.  The two Jones papers listed above also show how the GP based methods fit in with other basis set methods.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5063286-2281758017913198005?l=quantum_mc.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://quantum_mc.blogspot.com/feeds/2281758017913198005/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5063286&amp;postID=2281758017913198005' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5063286/posts/default/2281758017913198005'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5063286/posts/default/2281758017913198005'/><link rel='alternate' type='text/html' href='http://quantum_mc.blogspot.com/2007/03/efficient-global-optimization.html' title='Efficient Global Optimization'/><author><name>Mark</name><uri>http://www.blogger.com/profile/03956296363343527391</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5063286.post-4746803539365300569</id><published>2007-03-02T17:44:00.000-06:00</published><updated>2007-03-02T18:03:42.157-06:00</updated><title type='text'>Useful paper for VMC optimization?</title><content type='html'>I ran across this paper, &lt;a href="http://www.arxiv.org/abs/cs.NA/0611143"&gt;An informational approach to the global optimization of expensive-to-evaluate functions&lt;/a&gt;, and wondered if it might be useful for VMC optimization?&lt;br /&gt;&lt;p&gt;&lt;br /&gt;The type of problem being solved seems to fit:&lt;br /&gt;&lt;ol&gt;&lt;br /&gt;&lt;li&gt; Function is expensive to evaluate.&lt;br /&gt;&lt;li&gt; Function evaluation may be noisy.&lt;br /&gt;&lt;/ol&gt;&lt;br /&gt;&lt;p&gt;&lt;br /&gt;Many optimization methods estimate an optimal point and evaluate the function at that point.  The method described in the paper estimates the uncertainty in the knowledge of the function, and evaluates the function where it will best improve our knowledge of the function.&lt;br /&gt;&lt;p&gt;&lt;br /&gt;Some potential issues:&lt;br /&gt;&lt;ul&gt;&lt;br /&gt;&lt;li&gt;This method doesn't make use of gradient information, which may make it less competitive than methods that do use gradient information.&lt;/li&gt;&lt;br /&gt;&lt;li&gt;How well does it scale with the number of parameters?  The authors present a method to keep the cost under control as the dimension increases, but is the method still effective then?&lt;/li&gt;&lt;br /&gt;&lt;/ul&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5063286-4746803539365300569?l=quantum_mc.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://quantum_mc.blogspot.com/feeds/4746803539365300569/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5063286&amp;postID=4746803539365300569' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5063286/posts/default/4746803539365300569'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5063286/posts/default/4746803539365300569'/><link rel='alternate' type='text/html' href='http://quantum_mc.blogspot.com/2007/03/useful-paper-for-vmc-optimization.html' title='Useful paper for VMC optimization?'/><author><name>Mark</name><uri>http://www.blogger.com/profile/03956296363343527391</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5063286.post-322296660878182812</id><published>2007-02-23T08:21:00.000-06:00</published><updated>2007-02-23T16:00:01.659-06:00</updated><title type='text'>March meeting</title><content type='html'>This year's &lt;a href="http://www.aps.org/meetings/march/index.cfm"&gt;APS March meeting&lt;/a&gt; has a couple of sessions on QMC: &lt;a href="http://meetings.aps.org/Meeting/MAR07/sessionindex2/?SessionEventID=64115"&gt;H4: Recent Advances in quantum Monte Carlo Simulations&lt;/a&gt; and &lt;a href="http://meetings.aps.org/Meeting/MAR07/sessionindex2/?SessionEventID=64421"&gt;V21: General Theory: Computational Quantum Monte Carlo Methods&lt;/a&gt;.&lt;br /&gt;&lt;p&gt;&lt;br /&gt;Another session of interest (for me, anyway) is &lt;a href="http://meetings.aps.org/Meeting/MAR07/sessionindex2/?SessionEventID=56635"&gt;A23: Focus Session: High Pressure I - Earth and Planetary Materials&lt;/a&gt;&lt;br /&gt;&lt;p&gt;&lt;br /&gt;I will not be attending the March meeting this year, as my wife and I are expecting our first child in mid-March.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5063286-322296660878182812?l=quantum_mc.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://quantum_mc.blogspot.com/feeds/322296660878182812/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5063286&amp;postID=322296660878182812' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5063286/posts/default/322296660878182812'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5063286/posts/default/322296660878182812'/><link rel='alternate' type='text/html' href='http://quantum_mc.blogspot.com/2007/02/march-meeting.html' title='March meeting'/><author><name>Mark</name><uri>http://www.blogger.com/profile/03956296363343527391</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5063286.post-7647327581907030715</id><published>2007-01-18T08:24:00.000-06:00</published><updated>2007-01-18T08:39:31.560-06:00</updated><title type='text'>Science Blogging Conference</title><content type='html'>The &lt;a href="http://wiki.blogtogether.org/blogtogether/"&gt;North Caroline Science Blogging Conference&lt;/a&gt; starts this weekend.  It looks like it covers some introductory how-to material, and then dives into issues such as promoting public understanding of science, teaching, and how does blogging interact with research.&lt;br /&gt;&lt;p&gt;&lt;br /&gt;If you're put off by the term 'blog' being overused and overhyped, think of the conference as discussing the potential and challenges of a (relatively) new one-to-many and many-to-many communication mechanism and how that could affect the interactions between scientists and the public, and the interactions between scientists.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5063286-7647327581907030715?l=quantum_mc.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://quantum_mc.blogspot.com/feeds/7647327581907030715/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5063286&amp;postID=7647327581907030715' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5063286/posts/default/7647327581907030715'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5063286/posts/default/7647327581907030715'/><link rel='alternate' type='text/html' href='http://quantum_mc.blogspot.com/2007/01/science-blogging-conference.html' title='Science Blogging Conference'/><author><name>Mark</name><uri>http://www.blogger.com/profile/03956296363343527391</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5063286.post-6322654325421956248</id><published>2007-01-17T21:52:00.000-06:00</published><updated>2007-01-17T21:58:45.294-06:00</updated><title type='text'>Basis sets galore</title><content type='html'>More basis sets that you can shake a stick at over at the &lt;a href="http://gnode2.pnl.gov/bse/portal"&gt;EMSL Basis Set Exchange&lt;/a&gt;.  (Not sure why you would want to shake a stick at basis sets, though.)&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5063286-6322654325421956248?l=quantum_mc.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://quantum_mc.blogspot.com/feeds/6322654325421956248/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5063286&amp;postID=6322654325421956248' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5063286/posts/default/6322654325421956248'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5063286/posts/default/6322654325421956248'/><link rel='alternate' type='text/html' href='http://quantum_mc.blogspot.com/2007/01/basis-sets-galore.html' title='Basis sets galore'/><author><name>Mark</name><uri>http://www.blogger.com/profile/03956296363343527391</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5063286.post-116186813123176579</id><published>2006-10-26T08:08:00.000-05:00</published><updated>2006-10-26T08:08:51.266-05:00</updated><title type='text'>Schrodinger equation in the mass media</title><content type='html'>The Schrodinger equation appears in the background in the second half of &lt;a href="http://weirdal.com"&gt;Weird Al's&lt;/a&gt; video &lt;a href="http://www.youtube.com/watch?v=-xEzGIuY7kw"&gt;White &amp; Nerdy&lt;/a&gt;.&lt;br /&gt;&lt;p&gt;&lt;br /&gt;The video also shows rolling dice (briefly), if one wishes to stretch its relevance to include Monte Carlo as well.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5063286-116186813123176579?l=quantum_mc.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://quantum_mc.blogspot.com/feeds/116186813123176579/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5063286&amp;postID=116186813123176579' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5063286/posts/default/116186813123176579'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5063286/posts/default/116186813123176579'/><link rel='alternate' type='text/html' href='http://quantum_mc.blogspot.com/2006/10/schrodinger-equation-in-mass-media.html' title='Schrodinger equation in the mass media'/><author><name>Mark</name><uri>http://www.blogger.com/profile/03956296363343527391</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5063286.post-109919632190099282</id><published>2006-10-20T21:12:00.000-05:00</published><updated>2006-10-20T21:21:50.960-05:00</updated><title type='text'>The Other QMC</title><content type='html'>Quasi-Monte Carlo is the other method commonly referred to by the QMC acronym (I will abbreviate it QuasiMC to minimize confusion).  It's not really Monte Carlo since the sequence of points is not random, but the point sets do have a Monte Carlo-ish feel about them.&lt;br /&gt;&lt;br /&gt;  And in fact, it does share the property of arbitrary termination with Monte Carlo integration (consider a grid - you have have use all the points at a particular spacing.  Stopping half way across the region of integration is not going to yield good results).&lt;br /&gt;&lt;br /&gt;  The reason people are interested in QuasiMC is that its convergence is better than the 1/sqrt(N) of Monte Carlo.   It does this by using point sets that are more evenly distributed than random points - there are fewer clumps of points or large gaps that appear in random sequences (Search for 'Low-discrepancy sequences'.  Here's the Wikipedia  entries for a &lt;a href="http://en.wikipedia.org/wiki/Low-discrepancy_sequence"&gt;technical discussion&lt;/a&gt; and &lt;a href="http://en.wikipedia.org/wiki/Constructions_of_low-discrepancy_sequences"&gt;some sequences&lt;/a&gt;).&lt;br /&gt;   &lt;br /&gt;QuasiMC point sets are usually generated from sequences where the low-discrepancy condition can be verified theoretically, but it is possible to use the intuitive approach of making the points maximally spread out (see this &lt;a href="http://public.lanl.gov/kmh/talks/cdrh05vgr.abs.html"&gt;presentation&lt;/a&gt; for an example).&lt;br /&gt;&lt;br /&gt;The following algorithm will generate a set of N points that gives better convergence than random (at least it worked on a simple integrand in one dimension.)&lt;br /&gt;&lt;ol&gt;&lt;br /&gt; &lt;li&gt; compute some random points (&gt;&gt; N points) &lt;/li&gt;&lt;br /&gt; &lt;li&gt; pick a starting point and put it in the set S. &lt;/li&gt;&lt;br /&gt; &lt;li&gt; find the point that is the furthest from all existing points in S, and place that point in S. &lt;/li&gt;&lt;br /&gt; &lt;li&gt;  repeat the step 3 until N points are selected. &lt;/li&gt;&lt;br /&gt;&lt;/ol&gt;&lt;br /&gt;&lt;br /&gt;(I'm not saying this an efficient way to generate the points, just that it can be done.)&lt;br /&gt;&lt;br /&gt;For addition information, see also &lt;a href="http://www.nrbook.com/a/bookfpdf/f7-7.pdf"&gt;chapter 7.7&lt;/a&gt; in &lt;a href="http://www.nrbook.com/a/bookfpdf.html"&gt;Numerical Recipes&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5063286-109919632190099282?l=quantum_mc.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://quantum_mc.blogspot.com/feeds/109919632190099282/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5063286&amp;postID=109919632190099282' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5063286/posts/default/109919632190099282'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5063286/posts/default/109919632190099282'/><link rel='alternate' type='text/html' href='http://quantum_mc.blogspot.com/2006/10/other-qmc.html' title='The Other QMC'/><author><name>Mark</name><uri>http://www.blogger.com/profile/03956296363343527391</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5063286.post-115716055298840795</id><published>2006-09-01T20:21:00.000-05:00</published><updated>2006-09-01T20:29:13.000-05:00</updated><title type='text'>QMC wiki</title><content type='html'>Check out the QMC wiki at &lt;a href="http://www.qmcwiki.org"&gt;http://www.qmcwiki.org&lt;/a&gt;  &lt;br /&gt;&lt;br /&gt;It looks like a promising resource for the QMC research community.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5063286-115716055298840795?l=quantum_mc.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://quantum_mc.blogspot.com/feeds/115716055298840795/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5063286&amp;postID=115716055298840795' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5063286/posts/default/115716055298840795'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5063286/posts/default/115716055298840795'/><link rel='alternate' type='text/html' href='http://quantum_mc.blogspot.com/2006/09/qmc-wiki.html' title='QMC wiki'/><author><name>Mark</name><uri>http://www.blogger.com/profile/03956296363343527391</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5063286.post-115139072771574681</id><published>2006-06-27T01:15:00.000-05:00</published><updated>2006-06-27T01:45:30.203-05:00</updated><title type='text'>Optimal histogram bin width</title><content type='html'>Kevin Knuth wrote a paper about finding the optimal number of bins to represent data in a histogram (&lt;a href="http://www.arxiv.org/abs/physics/0605197"&gt;Optimal Data-Based Binning for Histograms&lt;/a&gt;).  He starts from a piecewise constant density model and finds the (Bayesian) posterior probability from this model (equation 36, which is actually the log of the posterior).  The posterior function is then maximized to find the number of bins that best models the data.&lt;br /&gt;&lt;p&gt;&lt;br /&gt;The article also investigates the number of data points for a reliable estimation of the density.  The recommendation is 100-150 points, if the distribution is Gaussian.&lt;br /&gt;&lt;p&gt;&lt;br /&gt;It would be interesting to apply this method to radial distribution functions.  However the assumption of a constant volume for each bin is not met in this case.  There are several ways this could be adjusted, but I'm not sure they are valid (scale each bin count by the volume, or use non-uniform bin spacing to maintain constant volume)  &lt;br /&gt;&lt;p&gt;&lt;br /&gt;Alternately, the discussion references other algorithms for dealing with variable bin-width models (which may be better for resolving multiple peaks anyway).&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5063286-115139072771574681?l=quantum_mc.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://quantum_mc.blogspot.com/feeds/115139072771574681/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5063286&amp;postID=115139072771574681' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5063286/posts/default/115139072771574681'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5063286/posts/default/115139072771574681'/><link rel='alternate' type='text/html' href='http://quantum_mc.blogspot.com/2006/06/optimal-histogram-bin-width.html' title='Optimal histogram bin width'/><author><name>Mark</name><uri>http://www.blogger.com/profile/03956296363343527391</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5063286.post-114985801479232067</id><published>2006-06-08T23:06:00.000-05:00</published><updated>2006-06-09T08:00:14.803-05:00</updated><title type='text'>QMC derivation notes</title><content type='html'>I posted a document I wrote in grad school, &lt;a href="http://www.markdewing.com/qmc/eloc/eloc.pdf"&gt;Notes on the wavefunction and local energy&lt;/a&gt;.  It contains derivations of various QMC formulas, particularly the first and second derivatives for several forms of wavefunctions.&lt;br /&gt;&lt;p&gt;&lt;br /&gt;I'm posting this for two reasons.  The first is in case anyone finds the formulas useful when working on a QMC code.&lt;br /&gt;&lt;p&gt;&lt;br /&gt;The second is related to the process of scientific programming.  When writing a QMC code, I found it useful to record the formulas and derivations in a neatly typset form.  Then the next step involved turning the equations into computer code.  (Then, of course, testing and debugging).&lt;br /&gt;&lt;p&gt;&lt;br /&gt;This workflow is what I would like to capture with the &lt;a href="http://quantum_mc.blogspot.com/2005/09/programming-in-math-updated.html"&gt;Progamming in Mathematical Notation&lt;/a&gt; work.   The document with derivations could be written in content MathML (or something more amenable to human manipulation).  Ideally the computer could then assist with verifying the derivations for correctness, and with converting the equations into computer code.&lt;br /&gt;&lt;p&gt;&lt;br /&gt;And as long as I'm dreaming, I'd really like a wiki-like interface for creating and editing such a document (making a set of hyperlinked pages rather than a single linear document)&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5063286-114985801479232067?l=quantum_mc.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://quantum_mc.blogspot.com/feeds/114985801479232067/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5063286&amp;postID=114985801479232067' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5063286/posts/default/114985801479232067'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5063286/posts/default/114985801479232067'/><link rel='alternate' type='text/html' href='http://quantum_mc.blogspot.com/2006/06/qmc-derivation-notes.html' title='QMC derivation notes'/><author><name>Mark</name><uri>http://www.blogger.com/profile/03956296363343527391</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5063286.post-114429622407471877</id><published>2006-04-05T22:43:00.000-05:00</published><updated>2006-04-05T23:03:44.086-05:00</updated><title type='text'>Interesting article studying writing journal articles</title><content type='html'>Last fall I looked at methods for improving the efficiency of MC simulations, and was pointed to the article, &lt;a href="http://prola.aps.org/abstract/PRA/v45/i12/p8894_1"&gt;Efficient Monte Carlo methods for the computer simulation of biological molecules&lt;/a&gt; by Djamal Bouzida, Shankar Kumar, and Robert Swendsen.&lt;br /&gt;&lt;p&gt;&lt;br /&gt;A search of the author's names on Yahoo turned up a &lt;a href="http://www.lcc.gatech.edu/%7Eherrington/classes/4406f2000/blakeslee.html"&gt;fascinating article&lt;/a&gt; by Ann Beakeslee, who studied the process of writing this paper.  The article examines the interaction of the graduate student (Bouzida) and the advisor (Swendsen), covers the process of learning to write scientific papers, and looks at difficulties Bouzida faced as a novice.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5063286-114429622407471877?l=quantum_mc.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://quantum_mc.blogspot.com/feeds/114429622407471877/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5063286&amp;postID=114429622407471877' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5063286/posts/default/114429622407471877'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5063286/posts/default/114429622407471877'/><link rel='alternate' type='text/html' href='http://quantum_mc.blogspot.com/2006/04/interesting-article-studying-writing.html' title='Interesting article studying writing journal articles'/><author><name>Mark</name><uri>http://www.blogger.com/profile/03956296363343527391</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5063286.post-114309196233316036</id><published>2006-03-22T23:24:00.000-06:00</published><updated>2006-03-22T23:32:42.343-06:00</updated><title type='text'>Search for chemicals</title><content type='html'>Check out &lt;a href="http://chmoogle.com"&gt;chmoogle&lt;/a&gt;, the search engine for chemicals.  Many of the results are for suppliers (not so useful for theoreticians), but some of the results contain more information about the chemical.&lt;br /&gt;&lt;p&gt;&lt;br /&gt;The "details" link by the chemical structure picture also has alternate names, along with links to search Google or Yahoo.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5063286-114309196233316036?l=quantum_mc.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://quantum_mc.blogspot.com/feeds/114309196233316036/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5063286&amp;postID=114309196233316036' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5063286/posts/default/114309196233316036'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5063286/posts/default/114309196233316036'/><link rel='alternate' type='text/html' href='http://quantum_mc.blogspot.com/2006/03/search-for-chemicals.html' title='Search for chemicals'/><author><name>Mark</name><uri>http://www.blogger.com/profile/03956296363343527391</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5063286.post-114303808054698373</id><published>2006-03-20T23:13:00.000-06:00</published><updated>2006-03-22T08:34:40.556-06:00</updated><title type='text'>[APS] First Principles Molecular Dynamics on Blue Gene</title><content type='html'>Francois Gygi gave a &lt;a href="http://meetings.aps.org/Meeting/MAR06/Event/40847"&gt;talk&lt;/a&gt; about scaling a first principles molecular dynamics code to 65,536 processors on the &lt;a href="http://www.llnl.gov/asci/platforms/bluegenel/bluegene_home.html"&gt;Blue Gene/L&lt;/a&gt; at LLNL.&lt;br /&gt;The core numerical algorithms that need to scale are the FFT and dense linear algebra.  The FFT is limited in scalability to 512 processors per k-point. Fortunately, there are many k-points and they can be computed independently.&lt;br /&gt;&lt;p&gt;&lt;br /&gt;Modifying the assignment of tasks to processors increased the performance by 64%!  FLOPS are free, it's the communication patterns that are determine performance.&lt;br /&gt;&lt;p&gt;&lt;br /&gt;One research problem is improving the scalability of computations for small systems (ie, 32 water molecules), so they can be simulated for longer times.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5063286-114303808054698373?l=quantum_mc.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://quantum_mc.blogspot.com/feeds/114303808054698373/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5063286&amp;postID=114303808054698373' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5063286/posts/default/114303808054698373'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5063286/posts/default/114303808054698373'/><link rel='alternate' type='text/html' href='http://quantum_mc.blogspot.com/2006/03/aps-first-principles-molecular.html' title='[APS] First Principles Molecular Dynamics on Blue Gene'/><author><name>Mark</name><uri>http://www.blogger.com/profile/03956296363343527391</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5063286.post-114291779638233307</id><published>2006-03-20T22:46:00.000-06:00</published><updated>2006-03-20T23:09:56.393-06:00</updated><title type='text'>[APS] Solar Power</title><content type='html'>David Carlson (from BP Solar) gave a talk titled, &lt;a href="http://meetings.aps.org/Meeting/MAR06/Event/40605"&gt;The Status and Outlook for the Photovoltaics Industry&lt;/a&gt;. His &lt;a href="http://www.aps.org/meet/MAR06/symposium.cfm"&gt;presentation slides&lt;/a&gt; are also available online.&lt;br /&gt;&lt;br /&gt;&lt;p&gt;&lt;br /&gt;Some random facts I found interesting&lt;br /&gt;&lt;ul&gt;&lt;br /&gt;&lt;li&gt; The photovoltaic industry has been growing at 35% per year.&lt;/li&gt;&lt;br /&gt;&lt;li&gt; This year, the PV industry will use as much or more silicon than the semiconductor industry.    This may cause problems with the growth curve, as suppliers ramp up to supply the PV industry. &lt;/li&gt;&lt;br /&gt;&lt;li&gt; The current cost per kWh is $0.18. Less than half of the cost is due to the PV module. (Slide 30)&lt;/li&gt;&lt;br /&gt;&lt;li&gt; Given the cost of PV electricity, the cost of conventional electricity, and the availability of sun, Spain is almost to the point of cost-competetive PV electricity. (Slide 31) &lt;/li&gt;&lt;br /&gt;&lt;br /&gt;&lt;/ul&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5063286-114291779638233307?l=quantum_mc.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://quantum_mc.blogspot.com/feeds/114291779638233307/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5063286&amp;postID=114291779638233307' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5063286/posts/default/114291779638233307'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5063286/posts/default/114291779638233307'/><link rel='alternate' type='text/html' href='http://quantum_mc.blogspot.com/2006/03/aps-solar-power.html' title='[APS] Solar Power'/><author><name>Mark</name><uri>http://www.blogger.com/profile/03956296363343527391</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5063286.post-114229372381783642</id><published>2006-03-13T17:35:00.000-06:00</published><updated>2006-03-20T23:11:17.083-06:00</updated><title type='text'>[APS] QC for QC</title><content type='html'>Intersting point from &lt;a href="http://meetings.aps.org/Meeting/MAR06/Event/40380"&gt;Alan's talk&lt;/a&gt; about using Quantum Computing to solve Quantum Chemistry problems:  computing cholestrol is about as hard as breaking encryption algorithms.&lt;br /&gt;&lt;p&gt;&lt;br /&gt;The quantum computing approach takes quite a bit of setup - an actual Hartree-Fock calculation or more.  The advantage of QC is that the exact answer (Full CI) can be obtained easily[1] by the QC from that starting point. (But going from HF to FCI is the hard part classically - I think Full CI scales exponentially in the system size)&lt;br /&gt;&lt;p&gt;&lt;br /&gt;[1] as much as anything with quantum computers can be called _easy_&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5063286-114229372381783642?l=quantum_mc.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://quantum_mc.blogspot.com/feeds/114229372381783642/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5063286&amp;postID=114229372381783642' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5063286/posts/default/114229372381783642'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5063286/posts/default/114229372381783642'/><link rel='alternate' type='text/html' href='http://quantum_mc.blogspot.com/2006/03/aps-qc-for-qc.html' title='[APS] QC for QC'/><author><name>Mark</name><uri>http://www.blogger.com/profile/03956296363343527391</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5063286.post-114229282209840198</id><published>2006-03-13T16:47:00.000-06:00</published><updated>2006-03-20T23:11:46.983-06:00</updated><title type='text'>[APS] Hydrogen storage</title><content type='html'>I went to a few talks in a session about &lt;a href="http://meetings.aps.org/Meeting/MAR06/SessionIndex2/?SessionEventID=40125"&gt;Simulations of hydrogen storage&lt;/a&gt;.   It appears that compressed gaseous hydrogen has about 10 times less energy density than gasoline.  (Some quick googling found &lt;a href="http://fuelcellstore.com/information/hydrogen_safety.html"&gt;this explanation&lt;/a&gt;.  It really matters if you're using volume or weight density - by weight hydrogen has a much higher energy density.)&lt;br /&gt;&lt;p&gt;&lt;br /&gt;John Tse talked about hydrate clathrates (there's lots of methane at the bottom of the ocean, and it may be a way to store hydrogen ).&lt;br /&gt;&lt;p&gt;&lt;br /&gt;One point I found interesting - the  potential bewteen a hydrogen molecule and a graphene sheet fits a Lennard-Jones potential quite well (for one particular site or orientation).&lt;br /&gt;&lt;p&gt;&lt;br /&gt;Technical note - Doing simulations with DFT is not quite sufficient to get good energies, they used MP2 level theory. (Seems this was repeated in another talk).  Question - are MP2 energies good enough, or is doing better just too expensive?&lt;br /&gt;&lt;p&gt;&lt;br /&gt;&lt;a href="http://www.wag.caltech.edu/home/wag/wag.html"&gt;William Goddard&lt;/a&gt; presented theoretical evaluations of several approaches to hydrogen storage.&lt;br /&gt;&lt;ul&gt;&lt;br /&gt;&lt;li&gt; Metallo-Organic Frameworks&lt;br /&gt;&lt;li&gt; Mg nanoparticles&lt;br /&gt;&lt;li&gt; Metal hydrides&lt;br /&gt;&lt;li&gt; Carbon materials (nanotubes, some doped with Li)&lt;br /&gt;&lt;/ul&gt;&lt;br /&gt;In the Mg nanoparticle section, he talked about solving the inversion problem - designed the material to specifications.  Their approach was find the potential (I think?) of a desirable atom, and find reals atoms to match.&lt;br /&gt;(There was a similar idea presented by &lt;a href="http://meetings.aps.org/Meeting/MAR06/Event/40381"&gt;Alex Zunger&lt;/a&gt;, trying to find materials that matched specific band-related properties)&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5063286-114229282209840198?l=quantum_mc.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://quantum_mc.blogspot.com/feeds/114229282209840198/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5063286&amp;postID=114229282209840198' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5063286/posts/default/114229282209840198'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5063286/posts/default/114229282209840198'/><link rel='alternate' type='text/html' href='http://quantum_mc.blogspot.com/2006/03/aps-hydrogen-storage.html' title='[APS] Hydrogen storage'/><author><name>Mark</name><uri>http://www.blogger.com/profile/03956296363343527391</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5063286.post-114188171046762364</id><published>2006-03-08T22:18:00.000-06:00</published><updated>2006-03-08T23:21:50.513-06:00</updated><title type='text'>Monte Carlo methods in CISE</title><content type='html'>Monte Carlo methods are the theme for the March issue of &lt;a href="http://cise.aip.org/dbt/dbt.jsp?KEY=CSENFA&amp;Volume=8&amp;Issue=2"&gt;Computing in Science and Engineering&lt;/a&gt;.  There's a broad overview article, an article covering the geometric cluster method (contains descriptions of the lattice-based cluster algorithms as well), an article examining Markov chains arising from computer science, and an article on sequential importance sampling.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5063286-114188171046762364?l=quantum_mc.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://quantum_mc.blogspot.com/feeds/114188171046762364/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5063286&amp;postID=114188171046762364' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5063286/posts/default/114188171046762364'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5063286/posts/default/114188171046762364'/><link rel='alternate' type='text/html' href='http://quantum_mc.blogspot.com/2006/03/monte-carlo-methods-in-cise.html' title='Monte Carlo methods in CISE'/><author><name>Mark</name><uri>http://www.blogger.com/profile/03956296363343527391</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5063286.post-114153562158502264</id><published>2006-03-04T23:01:00.000-06:00</published><updated>2006-03-04T23:13:41.596-06:00</updated><title type='text'>March meeting</title><content type='html'>I'll be at the &lt;a href="http://www.aps.org/meet/MAR06/"&gt;APS March Meeting&lt;/a&gt;.  &lt;br /&gt;&lt;p&gt;&lt;br /&gt;I'm &lt;a href="http://meetings.aps.org/Meeting/MAR06/Event/44923"&gt;giving a talk&lt;/a&gt; in session V27 (on Thursday).&lt;br /&gt;&lt;p&gt;&lt;br /&gt;If anyone else going to the meeting wants to meet and talk about QMC, MC, computational physics, or other topics, feel free to email me.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5063286-114153562158502264?l=quantum_mc.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://quantum_mc.blogspot.com/feeds/114153562158502264/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5063286&amp;postID=114153562158502264' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5063286/posts/default/114153562158502264'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5063286/posts/default/114153562158502264'/><link rel='alternate' type='text/html' href='http://quantum_mc.blogspot.com/2006/03/march-meeting.html' title='March meeting'/><author><name>Mark</name><uri>http://www.blogger.com/profile/03956296363343527391</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5063286.post-113764417790867403</id><published>2006-01-18T18:47:00.000-06:00</published><updated>2006-01-18T22:16:17.950-06:00</updated><title type='text'>Unbiased exponential estimators</title><content type='html'>The &lt;a href="http://www.arxiv.org/abs/physics/9812035"&gt;penalty method&lt;/a&gt; allows a Metropolis random walk to be correct even with the presence of noise in the probability function being sampled.&lt;br /&gt;&lt;p&gt;&lt;br /&gt;It eventually dawned on me that this same method can be used to correct any exponential estimator.&lt;br /&gt;&lt;p&gt;&lt;br /&gt;Imagine we wish to compute the estimator, exp(x), where x is some sample point that is contaminated with noise.  Suppose the variance of the noise is sigma, and we know the noise is gaussian.  Then the estimator exp(x-sigma^2/2) will be unbiased.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5063286-113764417790867403?l=quantum_mc.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://quantum_mc.blogspot.com/feeds/113764417790867403/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5063286&amp;postID=113764417790867403' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5063286/posts/default/113764417790867403'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5063286/posts/default/113764417790867403'/><link rel='alternate' type='text/html' href='http://quantum_mc.blogspot.com/2006/01/unbiased-exponential-estimators.html' title='Unbiased exponential estimators'/><author><name>Mark</name><uri>http://www.blogger.com/profile/03956296363343527391</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5063286.post-113738951720044185</id><published>2006-01-15T23:01:00.000-06:00</published><updated>2006-02-27T22:31:17.313-06:00</updated><title type='text'>Free Energy Links</title><content type='html'>&lt;a href="http://www.cs.utoronto.ca/~radford/"&gt;Radford Neal&lt;/a&gt; has written a paper on &lt;a href="http://www.arxiv.org/abs/math.ST/0511216"&gt;computing free energy differences&lt;/a&gt;.  The paper presents the Linked Importance Sampling method, but describes other methods as well.  The paper contains references to both the physics literature and the statistics literature, and uses physics language.&lt;br /&gt;&lt;p&gt;&lt;br /&gt;If you're really interested in free energy differences, check out Arjun Acharya's thesis, &lt;a href="http://www.ph.ed.ac.uk/~arjun/arjun_thesis/arjun_thesis.html"&gt;Free Energy differences: Representations, estimators, and sampling strategies&lt;/a&gt; (also on &lt;a href="http://www.arxiv.org/abs/cond-mat/0409613"&gt;arxiv&lt;/a&gt;). The review chapter covers several methods, but most of the thesis deals with the Phase Mapping technique, which increases the overlap between phases.  It does not eliminate the problem entirely, however, and many of the other methods can be used to deal with the remaining issues.&lt;br /&gt;&lt;p&gt;&lt;br /&gt;[Edit 2/27/06: updated links from comments, and revised the entry]&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5063286-113738951720044185?l=quantum_mc.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://quantum_mc.blogspot.com/feeds/113738951720044185/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5063286&amp;postID=113738951720044185' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5063286/posts/default/113738951720044185'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5063286/posts/default/113738951720044185'/><link rel='alternate' type='text/html' href='http://quantum_mc.blogspot.com/2006/01/free-energy-links.html' title='Free Energy Links'/><author><name>Mark</name><uri>http://www.blogger.com/profile/03956296363343527391</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5063286.post-113262620506440505</id><published>2005-11-21T20:13:00.000-06:00</published><updated>2005-11-21T20:23:25.073-06:00</updated><title type='text'>Linear scaling and noisy forces</title><content type='html'>This paper by Krajewski and Parrinello, &lt;a href="http://www.arxiv.org/abs/cond-mat/0508420"&gt;&lt;br /&gt;Linear scaling electronic structure calculations and accurate sampling with noisy forces&lt;/a&gt;, has two intriguing ideas.&lt;br /&gt;&lt;p&gt;&lt;br /&gt;They compute electronic structure using a new linear scaling method that involves sampling, and thus results in noisy forces.  Those forces are used to drive a molecular dynamics simulation of the nuclei (note that one of the authors is Parrinello).&lt;br /&gt;&lt;p&gt;&lt;br /&gt;For the electronic structure part of the problem, they replace a determinant in the independent particle grand potential with an integral over some fields.  These fields can be sampled using a Langevin equation.   This Langevin equation apparently involves only matrix-vector multiplication with a sparse matrix, which delivers the scaling.&lt;br /&gt;&lt;p&gt;&lt;br /&gt;The second part (starting in the paragraph before equation 11) is how to deal with the noisy forces in molecular dynamics.  Their solution for this is to again use a Langevin equation,  and to choose the size of the damping terms to cancel out the noise on average.  In this way they obtain correct sampling of the Boltzmann distribution.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5063286-113262620506440505?l=quantum_mc.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://quantum_mc.blogspot.com/feeds/113262620506440505/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5063286&amp;postID=113262620506440505' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5063286/posts/default/113262620506440505'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5063286/posts/default/113262620506440505'/><link rel='alternate' type='text/html' href='http://quantum_mc.blogspot.com/2005/11/linear-scaling-and-noisy-forces.html' title='Linear scaling and noisy forces'/><author><name>Mark</name><uri>http://www.blogger.com/profile/03956296363343527391</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5063286.post-113142511620291775</id><published>2005-11-07T22:34:00.000-06:00</published><updated>2005-11-07T22:46:20.606-06:00</updated><title type='text'>Polarization</title><content type='html'>Calculating observable properties of systems has been a weak point of QMC methods.  The paper, &lt;a href="http://arxiv.org/abs/cond-mat/0510606"&gt;Dielectric Response of Periodic Systems from Quantum Monte Carlo Calculations&lt;/a&gt; by Umari, Williamson, Galli, and Marzari remedies some of that deficiency by demonstrating a calculation of polarization using DMC.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5063286-113142511620291775?l=quantum_mc.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://quantum_mc.blogspot.com/feeds/113142511620291775/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5063286&amp;postID=113142511620291775' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5063286/posts/default/113142511620291775'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5063286/posts/default/113142511620291775'/><link rel='alternate' type='text/html' href='http://quantum_mc.blogspot.com/2005/11/polarization.html' title='Polarization'/><author><name>Mark</name><uri>http://www.blogger.com/profile/03956296363343527391</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5063286.post-112736747763765074</id><published>2005-09-22T00:31:00.000-05:00</published><updated>2007-02-24T23:20:15.803-06:00</updated><title type='text'>"Programming in Math" updated</title><content type='html'>The paper on &lt;a href="http://www.markdewing.com/prog_in_math/intro.xhtml"&gt;Programming in Mathematical Notation&lt;/a&gt; has been updated. (see previous blog entry about &lt;a href="http://quantum_mc.blogspot.com/2005/07/programming-in-math.html"&gt;Programming in Math&lt;/a&gt;)&lt;br /&gt;&lt;p&gt;&lt;br /&gt;I've added a page about integration by random sampling.  This example adds Greek characters, and a foreign function interface for the random number generator.  Also, the translation of several separate sums (defining average, variance, etc) into C++ requires the sums to be merged into a single loop.&lt;br /&gt;&lt;p&gt;&lt;br /&gt;[Edit 2/24/2007 - update link]&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5063286-112736747763765074?l=quantum_mc.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://quantum_mc.blogspot.com/feeds/112736747763765074/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5063286&amp;postID=112736747763765074' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5063286/posts/default/112736747763765074'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5063286/posts/default/112736747763765074'/><link rel='alternate' type='text/html' href='http://quantum_mc.blogspot.com/2005/09/programming-in-math-updated.html' title='&quot;Programming in Math&quot; updated'/><author><name>Mark</name><uri>http://www.blogger.com/profile/03956296363343527391</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5063286.post-112371953646605882</id><published>2005-08-10T18:37:00.000-05:00</published><updated>2005-08-10T19:18:56.470-05:00</updated><title type='text'>Cluster algorithm</title><content type='html'>In the paper, &lt;a href="http://www.arxiv.org/abs/cond-mat/0508100"&gt;Cluster algorithm for pairwise-interacting particles&lt;/a&gt;, Stephen Whitelam and Phillip Geissler describe an algorithm for creating a cluster of particles to move as a group.&lt;br /&gt;&lt;p&gt;&lt;br /&gt;The cluster starts with a randomly chosen particle and grows by adding particles with some probability (based on the Boltzmann factor).  Particles that strongly interact with cluster are more likely to be part of the cluster. Then a normal trial move is made of the cluster as a whole.&lt;br /&gt;&lt;p&gt;&lt;br /&gt;Importantly, the potential and temperature chosen for this operation are not the same as the potential and temperature of the system.  In fact, the cluster size can be controlled by adjusting the temperature (at infinite temperature each cluster is only a single particle).  This cluster temperature is varied during the simulation run to sample moves with different cluster sizes.&lt;br /&gt;&lt;p&gt;&lt;br /&gt;See the paper for more details about controlling the range of energies involved in the cluster (and the cluster interface energies).&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5063286-112371953646605882?l=quantum_mc.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://quantum_mc.blogspot.com/feeds/112371953646605882/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5063286&amp;postID=112371953646605882' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5063286/posts/default/112371953646605882'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5063286/posts/default/112371953646605882'/><link rel='alternate' type='text/html' href='http://quantum_mc.blogspot.com/2005/08/cluster-algorithm.html' title='Cluster algorithm'/><author><name>Mark</name><uri>http://www.blogger.com/profile/03956296363343527391</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5063286.post-112190108505796802</id><published>2005-07-20T18:02:00.000-05:00</published><updated>2007-02-24T23:19:08.223-06:00</updated><title type='text'>Programming in Math</title><content type='html'>In a previous post on &lt;a href="http://quantum_mc.blogspot.com/2005/04/solving-science-problems.html"&gt;Solving science problems&lt;/a&gt;, I commented on the process of scientific computation. One of the steps was converting the solvable equations into a computer program.&lt;br /&gt;&lt;p&gt;&lt;br /&gt;As part of making that step more transparent, I've been working on method for &lt;a href="http://www.markdewing.com/prog_in_math/simple_example.xhtml"&gt;Programming in Mathematical Notation&lt;/a&gt; (works best with MathML capable browser).&lt;br /&gt;&lt;p&gt;&lt;br /&gt;The program takes a content MathML file as input and outputs a presentation MathML file for nicely rendered display in the browser, and a C++ file to compile and run.&lt;br /&gt;&lt;p&gt;&lt;br /&gt;[Edit 2/24/2007 - update link to example]&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5063286-112190108505796802?l=quantum_mc.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://quantum_mc.blogspot.com/feeds/112190108505796802/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5063286&amp;postID=112190108505796802' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5063286/posts/default/112190108505796802'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5063286/posts/default/112190108505796802'/><link rel='alternate' type='text/html' href='http://quantum_mc.blogspot.com/2005/07/programming-in-math.html' title='Programming in Math'/><author><name>Mark</name><uri>http://www.blogger.com/profile/03956296363343527391</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5063286.post-111742825368069443</id><published>2005-05-29T23:03:00.000-05:00</published><updated>2005-05-29T23:45:29.470-05:00</updated><title type='text'>Fast variance optimization</title><content type='html'>VMC variance optimization usually uses the reweighted variance.&lt;br /&gt;&lt;br /&gt;What is reweighting? Consider a set of particle positions obtained from sampling a wavefunction at a given set of parameters.  The energy (and the variance of the energy) explicitly depends on the wavefunction parameters by the local energy formula, and implicitly through the particle positions determined by sampling the wavefunction.  When optimizing, one would like to vary the parameters without going through all the trouble and expense of sampling new positions.  Computing the energy (or variance) change due to the local energy piece is easy - just put the new parameters in and recalculate.  Reweighting is the process of correcting the implicit dependence of the energy (or variance) on the wavefunction parameters.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;N. D. Drummond and R. J. Needs describe a VMC optimization method in their paper, &lt;a href="http://www.arxiv.org/abs/physics/0505072"&gt;A variance-minimization scheme for optimizing Jastrow factors&lt;/a&gt;, that uses only the explicit dependence of the variance on the parameters (ie, they use the un-reweighted variance).  They restrict their scheme to linear parameters in the Jastrow factor, and this makes the resulting parameter surface a quartic.  Also, this scheme only requires a single sum over electron positions (the requisite factors can be accumulated during a single run), making the optimization step very fast.&lt;br /&gt;&lt;br /&gt;Even though this scheme uses a less accurate approximation for the variance, it appears to give very good results.  In fact, the resulting energies for a neon atom are better using the unreweighted variance for optimization than from using the more traditional reweighted variance.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5063286-111742825368069443?l=quantum_mc.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://quantum_mc.blogspot.com/feeds/111742825368069443/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5063286&amp;postID=111742825368069443' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5063286/posts/default/111742825368069443'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5063286/posts/default/111742825368069443'/><link rel='alternate' type='text/html' href='http://quantum_mc.blogspot.com/2005/05/fast-variance-optimization.html' title='Fast variance optimization'/><author><name>Mark</name><uri>http://www.blogger.com/profile/03956296363343527391</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5063286.post-111365569461419245</id><published>2005-04-16T07:30:00.000-05:00</published><updated>2005-04-20T23:41:03.066-05:00</updated><title type='text'>Solving science problems</title><content type='html'>What is the ideal programming language for MC simulations?  &lt;br /&gt;&lt;br /&gt;What if we could design a language expressly for MC and QMC simulations - what would it look like?  As a first step, let's put programming in the context of solving the whole problem.&lt;br /&gt;&lt;p&gt;&lt;br /&gt;Steps to solve a computational science problem&lt;br /&gt;&lt;ol&gt;&lt;br /&gt;&lt;li&gt; Define the problem (ask the question)&lt;br /&gt;&lt;li&gt; Write down the equations modeling the system under investigation&lt;br /&gt;&lt;li&gt; Using mathematical transformations and approximations, reduce the equations to a solvable form  (numerical analysis)&lt;br /&gt;&lt;li&gt; Convert into a computer program and run it&lt;br /&gt;&lt;li&gt; Undertake verification (are steps 2,3, and 4 correct) and validation (are step 1 and the approximations in step 2 correct)&lt;br /&gt;&lt;/ol&gt;&lt;br /&gt;&lt;p&gt;&lt;br /&gt;Developing techniques for managing each of the steps would be a great help.  Current programming languages only deal with step 4.  Computer algebra systems (Mathematica, Maple, Maxima, etc) can help with steps 2 and 3, but don't really help in making the jump to a large scale program.&lt;br /&gt;&lt;p&gt;&lt;br /&gt;Currently the transformations from steps 2 through 4 are done by hand.  I know I make many mistakes in this process.  It would be a boon to my productivity if the computer could verify that all the minus signs and factors of 2 are correct.&lt;br /&gt;&lt;p&gt;&lt;br /&gt;The verification step often involves understanding the effects of various approximations in step 3.  If the program is described as a series of transformations on the equations, hopefully changing the approximation would be a simple change to the equations, and the rest of the process would automatically generate a correct program.  This would make it easier to test approximations.&lt;br /&gt;&lt;p&gt;&lt;br /&gt;This doesn't say much about the ideal programming language, but it does give some idea of the problem to be solved.  I'll have more to say about the ideal programming language later.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5063286-111365569461419245?l=quantum_mc.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://quantum_mc.blogspot.com/feeds/111365569461419245/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5063286&amp;postID=111365569461419245' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5063286/posts/default/111365569461419245'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5063286/posts/default/111365569461419245'/><link rel='alternate' type='text/html' href='http://quantum_mc.blogspot.com/2005/04/solving-science-problems.html' title='Solving science problems'/><author><name>Mark</name><uri>http://www.blogger.com/profile/03956296363343527391</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5063286.post-111343929462941146</id><published>2005-04-13T19:13:00.000-05:00</published><updated>2005-04-13T20:39:54.376-05:00</updated><title type='text'>Programming Language Notes</title><content type='html'>On the Sun website, there's an &lt;a href="http://www.sun.com/presents/minds/2005-0302/"&gt;interview with Guy Steele&lt;/a&gt;.  He talks a little bit about Fortress, which tries to make programs looks more the original problem domain by allowing more mathematical notation.  I will be interested to see the results.&lt;br /&gt;&lt;p&gt;&lt;br /&gt;Guy Steele is also the principal investigator for the &lt;a href="http://research.sun.com/projects/plrg/"&gt;Programming Language Research&lt;/a&gt; group.  On that page there is a paper titled &lt;a href="http://portal.acm.org/citation.cfm?id=1028976.1029008#opub"&gt;Object-Oriented Units of Measurement&lt;/a&gt;.  It's a look the issues involved in making units work in a Java-like OO language.&lt;br /&gt;&lt;p&gt;&lt;br /&gt;The last note is an ACM Queue article by &lt;a href="http://www.third-bit.com/~gvwilson/"&gt;Gregory Wilson&lt;/a&gt; about &lt;a href="http://www.acmqueue.org/modules.php?name=Content&amp;pa=showpage&amp;pid=247"&gt;Extensible Programming&lt;/a&gt;.  The article points out that there are advantages to storing the program text in a more structured form, including being able to include diagrams or math notation in the source code.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5063286-111343929462941146?l=quantum_mc.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://quantum_mc.blogspot.com/feeds/111343929462941146/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5063286&amp;postID=111343929462941146' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5063286/posts/default/111343929462941146'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5063286/posts/default/111343929462941146'/><link rel='alternate' type='text/html' href='http://quantum_mc.blogspot.com/2005/04/programming-language-notes.html' title='Programming Language Notes'/><author><name>Mark</name><uri>http://www.blogger.com/profile/03956296363343527391</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5063286.post-111166970336091208</id><published>2005-03-24T06:47:00.000-06:00</published><updated>2005-03-24T07:26:00.006-06:00</updated><title type='text'>Whack A Mole</title><content type='html'>In QMC, a central role is given to the local energy, defined as (1/psi)H psi, where psi is the trial wave function.  If psi is an eigenstate, then H psi = E psi by definition, and the local energy becomes a constant.  Just as lower energy trial functions are deemed better than higher energy ones, those with fewer fluctutations are better than those with more fluctutations.&lt;br /&gt;&lt;p&gt;&lt;br /&gt;  One could imagine looking at the fluctuations in the local energy, and using those to determine where best to adjust the trial wave function to reduce the fluctutations (side note: one would want to use psi^2 times the local energy, since fluctuations are weighted by psi^2 in the integrals).  This seems similar to the game of Whack-A-Mole, where one attempts to hit mechanical moles that pop up randomly for a brief period of time.  Maybe the method could be called Whack-A-Local-Energy (WHALE).&lt;br /&gt;&lt;p&gt;&lt;br /&gt;Unfortunately for my naming scheme (and fortunately for everyone else), the method described already exists, and it's called the Energy Fluctutation Potential (EFP) method. It was first described by Stephen Fahy in "Quantum Monte Carlo Methods in Physics and Chemistry" [NATO ASI Ser. C 525 101, 1999; M. P. Nightingale and C. J. Umrigar, eds].  Further papers describing the method:&lt;br /&gt;&lt;ul&gt;&lt;br /&gt;&lt;li&gt;&lt;a href="http://www.arxiv.org/abs/cond-mat/9906305"&gt;Optimal orbitals from energy fluctuations in correlated wave functions&lt;/a&gt;, by Fahy and Filippi&lt;br /&gt;&lt;li&gt;&lt;a href="http://www.arxiv.org/abs/cond-mat/0202137"&gt; Optimization of inhomogeneous electron correlation factors in periodic solids&lt;/a&gt; by Prendergast, Bevan, and Fahy&lt;br /&gt;&lt;li&gt;&lt;a href="http://www.arxiv.org/abs/cond-mat/0403509"&gt; Optimized Jastrow-Slater wave functions for ground and excited states: Application to the lowest states of ethene&lt;/a&gt; by Schautz and Filippi&lt;br /&gt;&lt;/ul&gt;&lt;br /&gt;&lt;p&gt;&lt;br /&gt;The EFP method involves an iteration that starts with a one-body solver (HF or LDA). The resulting orbitals are used in a VMC calculation, and the fluctuations in the local energy form a extra potential that is fed back into the one-body solver to get new orbitals, and the iteration repeats until a self-consistent solution is reached.&lt;br /&gt;&lt;p&gt;&lt;br /&gt;(Name note: &lt;a href="http://arxiv.org/abs/cond-mat/0412634"&gt;this paper&lt;/a&gt; by Umrigar and Filippi calls it the Effective Fluctuation Potential method.  This paper also gives another reference I didn't put on the above list)&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5063286-111166970336091208?l=quantum_mc.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://quantum_mc.blogspot.com/feeds/111166970336091208/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5063286&amp;postID=111166970336091208' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5063286/posts/default/111166970336091208'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5063286/posts/default/111166970336091208'/><link rel='alternate' type='text/html' href='http://quantum_mc.blogspot.com/2005/03/whack-mole.html' title='Whack A Mole'/><author><name>Mark</name><uri>http://www.blogger.com/profile/03956296363343527391</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5063286.post-111136089141213301</id><published>2005-03-20T16:25:00.000-06:00</published><updated>2005-03-20T17:24:11.540-06:00</updated><title type='text'>Store, manage, and share your reading list</title><content type='html'>The cleverly-named &lt;a href="http://del.icio.us/"&gt;del.icio.us&lt;/a&gt; site describes itself as "social bookmarks."  The "bookmarks" part allows users to keep track of links online, include a short description, and add an arbitrary number of one-word tags to help categorize the link.  With the &lt;br /&gt;"social" part, people's bookmarks are available to everone else.&lt;br /&gt;&lt;br&gt;&lt;br /&gt;Here's my list of &lt;a href="http://del.icio.us/randomharry"&gt;bookmarks&lt;/a&gt;. (I just started, it's not very large)&lt;br /&gt;&lt;p&gt;&lt;br /&gt;For the academic world, Richard Cameron created &lt;a href="http://www.citeulike.org/"&gt;CiteULike&lt;/a&gt;.   It allows assigning category tags to papers, and has the social aspect of sharing links to papers. Perhaps most importantly, it can automatically import bibliographic information from supported publishers (including arXiv) and export the information to other formats (BibTex, EndNote).&lt;br /&gt;&lt;br&gt;&lt;br /&gt;Here's my &lt;a href="http://www.citeulike.org/user/markdewing"&gt;list of articles&lt;/a&gt;. (Once again, very small so far)&lt;br /&gt;&lt;p&gt;&lt;br /&gt;The link to CiteULike was found via &lt;a href="http://www.corante.com/many/archives/2005/03/12/citeulike.php"&gt;Corante&lt;/a&gt;&lt;br /&gt;&lt;p&gt;&lt;br /&gt;I don't know whether either of these will be a useful tool for research, but it seems worthwhile to try them out. When I started grad school in 1993, I went to the library to photocopy articles.  By the time I finished in 2000, I went to the library website to download articles.  That seems like a large shift, but I suspect it's not just because it makes it faster and more efficient to get the articles - it's the linking, management, and annotations represented by these sorts of applications that will make a bigger change in the future.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5063286-111136089141213301?l=quantum_mc.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://quantum_mc.blogspot.com/feeds/111136089141213301/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5063286&amp;postID=111136089141213301' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5063286/posts/default/111136089141213301'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5063286/posts/default/111136089141213301'/><link rel='alternate' type='text/html' href='http://quantum_mc.blogspot.com/2005/03/store-manage-and-share-your-reading.html' title='Store, manage, and share your reading list'/><author><name>Mark</name><uri>http://www.blogger.com/profile/03956296363343527391</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5063286.post-110982232349213934</id><published>2005-03-02T21:26:00.000-06:00</published><updated>2005-03-02T22:07:15.186-06:00</updated><title type='text'>MathMath</title><content type='html'>A wiki seems like a good way to organize information.  Blogs work nice for recording thoughts and links in chronological order, but aren't so good for organizing ideas topically or for revising items.  Proto-papers or latex files with background information have been used.  The easily edited environment of a wiki seems like it would function well, even if were only used personally (part of the wiki idea is open collaborative editing).  The wiki text markup is much lighter than HTML, so it would be easier to deal with than maintaining a set of web pages.&lt;br /&gt;&lt;br /&gt;The real issue is integrating mathematics.  Mozilla and derivatives can handle MathML (and IE can with a plugin), so that seems like a good route (inserting pictures is marginally okay for converting papers to HTML, but is not as good for a more interactive environment).  The only problem with MathML is the rapid onset of RSI if you actually write equations with it.&lt;br /&gt;&lt;br /&gt;There are a couple of solutions, both convert TeX or vaguely TeX-like input to MathML.  They are &lt;a href="http://pear.math.pitt.edu/mathzilla/itex2mml.html"&gt;itex2mml&lt;/a&gt; and &lt;a href="http://www1.chapman.edu/~jipsen/mathml/asciimath.html"&gt;AsciiMathML&lt;/a&gt;.  The second solution seems rather nice, as it uses javascript to convert the TeX-like notation to MathML when the page loads into the browser.&lt;br /&gt;&lt;br /&gt;For a wiki, I've been looking into &lt;a href="http://moinmoin.wikiwikiweb.de/FrontPage"&gt;MoinMoin&lt;/a&gt;.  At first I tried hacking itex2mml into it, and it took quite a few changes to make everything proper XHTML.  Then I found the page that describes integrating &lt;a href="http://moinmoin.wikiwikiweb.de/MathMlSupport"&gt;AsciiMathML&lt;/a&gt; into MoinMoin, and that was much smoother.&lt;br /&gt;&lt;br /&gt;AsciiMathML also has a nice way of &lt;a href="http://www1.chapman.edu/~jipsen/mathml/asciimathextend.html"&gt;adding new symbols&lt;/a&gt;, that doesn't require changing the AsciiMathML.js file.&lt;br /&gt;In keeping with title of this weblog, the Unicode number for hbar is 0x210F. (although it usually only appears once in a paper and is promptly set to "1")  The code for adding it is&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;&amp;lt;script type="text/javascript"&amp;gt;&lt;br /&gt;AMsymbols = AMsymbols.concat([&lt;br /&gt;{input:"hbar", tag:"mo", output:"\u210F", tex:"hbar"}&lt;br /&gt;]);&lt;br /&gt;&amp;lt;/script&amp;gt;&lt;br /&gt;&lt;/pre&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5063286-110982232349213934?l=quantum_mc.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://quantum_mc.blogspot.com/feeds/110982232349213934/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5063286&amp;postID=110982232349213934' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5063286/posts/default/110982232349213934'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5063286/posts/default/110982232349213934'/><link rel='alternate' type='text/html' href='http://quantum_mc.blogspot.com/2005/03/mathmath.html' title='MathMath'/><author><name>Mark</name><uri>http://www.blogger.com/profile/03956296363343527391</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5063286.post-110894892078210724</id><published>2005-02-20T19:11:00.000-06:00</published><updated>2005-02-20T19:22:00.783-06:00</updated><title type='text'>Chemistry Textbooks</title><content type='html'>Jack Simons has a couple of introductory chemistry textbooks on his &lt;a href="http://simons.hec.utah.edu/Theorypage/index.html"&gt;website&lt;/a&gt;.  They are &lt;a href="http://simons.hec.utah.edu/NewUndergradBook/TableofContents.html"&gt;An Introduction to Theoretical Chemistry&lt;/a&gt; and &lt;a href="http://simons.hec.utah.edu/Theorypage/BookPDF/TableofContents.html"&gt;Quantum Mechanics in Chemistry&lt;/a&gt; (with Jeff Nichols).&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5063286-110894892078210724?l=quantum_mc.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://quantum_mc.blogspot.com/feeds/110894892078210724/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5063286&amp;postID=110894892078210724' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5063286/posts/default/110894892078210724'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5063286/posts/default/110894892078210724'/><link rel='alternate' type='text/html' href='http://quantum_mc.blogspot.com/2005/02/chemistry-textbooks.html' title='Chemistry Textbooks'/><author><name>Mark</name><uri>http://www.blogger.com/profile/03956296363343527391</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5063286.post-110809354220131438</id><published>2005-02-10T21:24:00.000-06:00</published><updated>2005-02-10T21:45:42.203-06:00</updated><title type='text'>Stochastic Matrix Inversion</title><content type='html'>I ran across this paper, &lt;a href="http://www.arxiv.org/abs/cs.DS/0412107"&gt;A Monte Carlo algorithm for efficient large matrices inversion&lt;/a&gt;. There are a couple of techniques presented, one which is similar to the iterative Gauss-Seidel algorithm.&lt;br /&gt;&lt;p&gt;&lt;br /&gt;QMC methods often use a matrix to enforce antisymmetry conditions on a fermionic wavefunction.  The determinant is needed for the wavefunction itself, and the inverse matrix is used for the local energy.&lt;br /&gt;&lt;p&gt;&lt;br /&gt;I wonder if a stochastic matrix algorithm would be useful in the QMC calculations.  My guess is that it would not be (and if there is an efficiency gain, it might be offset by the added complexity), but it would be interesting to try, if for no other reason than ideological purity (if you're going to use a stochastic method, might as well make it as stochastic as possible!)&lt;br /&gt;&lt;p&gt;&lt;br /&gt;Other interesting questions arise.  The locations of the all-important wavefunction nodes will now be fuzzy.  What consequences does this have for a fixed-node algorithm?&lt;br /&gt;&lt;p&gt;&lt;br /&gt;Inverse matrices also appear in Sorella's Stochastic Reconfiguration method for optimization.  Another use?&lt;br /&gt;&lt;p&gt;&lt;br /&gt;On a side note, I tried looking for background on Google, but searching for "stochastic matrix inversion" returned results relevant to inverting a stochastic matrix rather than stochastic methods for inverting a matrix.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5063286-110809354220131438?l=quantum_mc.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://quantum_mc.blogspot.com/feeds/110809354220131438/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5063286&amp;postID=110809354220131438' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5063286/posts/default/110809354220131438'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5063286/posts/default/110809354220131438'/><link rel='alternate' type='text/html' href='http://quantum_mc.blogspot.com/2005/02/stochastic-matrix-inversion.html' title='Stochastic Matrix Inversion'/><author><name>Mark</name><uri>http://www.blogger.com/profile/03956296363343527391</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5063286.post-110558359653154745</id><published>2005-01-12T20:22:00.000-06:00</published><updated>2005-01-12T20:33:16.530-06:00</updated><title type='text'>Nifty math and physics applets</title><content type='html'>Paul Falstad has a page of &lt;a href="http://www.falstad.com/mathphysics.html"&gt;math and physics applets&lt;/a&gt;.  (found via &lt;a href="http://alan.aspuru.com/archives/2004/12/19/various-physics-related-applets/"&gt;Alan Aspuru-Guzik's&lt;/a&gt; weblog)&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5063286-110558359653154745?l=quantum_mc.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://quantum_mc.blogspot.com/feeds/110558359653154745/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5063286&amp;postID=110558359653154745' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5063286/posts/default/110558359653154745'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5063286/posts/default/110558359653154745'/><link rel='alternate' type='text/html' href='http://quantum_mc.blogspot.com/2005/01/nifty-math-and-physics-applets.html' title='Nifty math and physics applets'/><author><name>Mark</name><uri>http://www.blogger.com/profile/03956296363343527391</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5063286.post-110311569451567588</id><published>2004-12-15T06:42:00.000-06:00</published><updated>2005-01-12T17:20:14.766-06:00</updated><title type='text'>Get your units correct</title><content type='html'>Check out &lt;a href="http://futureboy.homeip.net/frinkdocs/"&gt;Frink&lt;/a&gt;. It's a language designed to ease calculations involving units and unit conversions.   I haven't tried it, but it looks interesting.  The examples are amusing, and the data file for all the conversions (&lt;a href="http://futureboy.homeip.net/frinkdata/units.txt"&gt;units.txt&lt;/a&gt;) makes interesting reading.  Also interesting is &lt;a href="http://futureboy.homeip.net/frinkdocs/LL4.html"&gt;Alan Eliasen's presentation&lt;/a&gt; at the Lightweight Languages 4 conference.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5063286-110311569451567588?l=quantum_mc.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://quantum_mc.blogspot.com/feeds/110311569451567588/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5063286&amp;postID=110311569451567588' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5063286/posts/default/110311569451567588'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5063286/posts/default/110311569451567588'/><link rel='alternate' type='text/html' href='http://quantum_mc.blogspot.com/2004/12/get-your-units-correct.html' title='Get your units correct'/><author><name>Mark</name><uri>http://www.blogger.com/profile/03956296363343527391</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5063286.post-110109855451535126</id><published>2004-11-21T22:30:00.000-06:00</published><updated>2005-01-12T17:21:59.586-06:00</updated><title type='text'>Hierarchical VMC (was Probabilistic Functions III)</title><content type='html'>A couple comments from the last post.&lt;br&gt;&lt;br /&gt;I had wondered whether it was possible for VMC to get as good of results as DMC.  In theory, of course, the answer is "yes".  Provided there is enough variational freedom.  This is the hard part.&lt;br /&gt;&lt;p&gt;&lt;br /&gt;On to the second point.&lt;br&gt;&lt;br /&gt;I had proposed a variational wavefunction consisting of the sum of gaussians.  The centers and widths were then the parameters to be optimized.  The starting center points were to be generated by sampling from a more traditional wavefunction.  Why bother? Why not start from a uniform distribution?&lt;br /&gt;&lt;p&gt;&lt;br /&gt;My speculative answer is that it would be horribly inefficient, and very likely to follow wrong paths (since the wavefunction is so "floppy").  So starting from a traditional wavefunction is a form of accelerating the convergence of the optimization procedure.&lt;br /&gt;&lt;p&gt;&lt;br /&gt;The idea seems to be one of hierarchical VMC, or of a hierarchical wavefunction that can be optimized in steps.  The coarse parts are optimized first, and then the finer details are added later.  Vaguely like a wavelet decomposition or a multigrid method deals with spatial resolution.&lt;br /&gt;&lt;p&gt;&lt;br /&gt;It still remains to be seen if the sum-of-gaussians wavefunction survives contact with reality.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5063286-110109855451535126?l=quantum_mc.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://quantum_mc.blogspot.com/feeds/110109855451535126/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5063286&amp;postID=110109855451535126' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5063286/posts/default/110109855451535126'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5063286/posts/default/110109855451535126'/><link rel='alternate' type='text/html' href='http://quantum_mc.blogspot.com/2004/11/hierarchical-vmc-was-probabilistic.html' title='Hierarchical VMC (was Probabilistic Functions III)'/><author><name>Mark</name><uri>http://www.blogger.com/profile/03956296363343527391</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5063286.post-110083869637471939</id><published>2004-11-18T22:11:00.000-06:00</published><updated>2004-11-18T22:31:36.373-06:00</updated><title type='text'>Probabilistic Functions II</title><content type='html'>Last time I looked at the sequence of values obtained from sampling a function.  I was trying to understand what would happen if used a sum of gaussians, each centered at one of these values.&lt;br /&gt;&lt;p&gt;&lt;br /&gt;I was confused because I had a set of sample points, but also a function using those points that could be considered a variational trial function in its own right.&lt;br /&gt;The width of gaussians can be taken as a variational parameter, and optimized.&lt;br /&gt;&lt;p&gt;&lt;br /&gt;The idea for a MC scheme would be to generate a set of sample points from a trial function. Then the diffusion algorithm would be stepped forward in time to get a better approximation to the wave function.&lt;br /&gt;&lt;p&gt;&lt;br /&gt;But we can go further and consider all the center points as variational parameters as well.  And we don't actually care about the diffusion part - it is only a device to relax the wavefunction to the ground state.  We could use any optimization method instead.  Now this form for the wavefunction is likely to have lots linear dependencies.  Some optimization methods may have problems with this.&lt;br /&gt;&lt;p&gt;&lt;br /&gt;One could simply do a random walk - try moving a point, evaluate the energy (with VMC), and accept or reject the move based on the energy difference.  Could one get DMC-like quality from VMC?&lt;br /&gt;&lt;p&gt;&lt;br /&gt;I can see a couple possible problems, so far.  Getting the boundary conditions and cusp conditions correct may be difficult.  The "basis" functions don't need to be a set of gaussians - just positive functions with a center point and a width.  Also, there may be so much variational freedom that convergence takes a long time.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5063286-110083869637471939?l=quantum_mc.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://quantum_mc.blogspot.com/feeds/110083869637471939/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5063286&amp;postID=110083869637471939' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5063286/posts/default/110083869637471939'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5063286/posts/default/110083869637471939'/><link rel='alternate' type='text/html' href='http://quantum_mc.blogspot.com/2004/11/probabilistic-functions-ii.html' title='Probabilistic Functions II'/><author><name>Mark</name><uri>http://www.blogger.com/profile/03956296363343527391</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5063286.post-110075320170103256</id><published>2004-11-17T22:34:00.000-06:00</published><updated>2004-11-17T23:22:23.806-06:00</updated><title type='text'>Probabilistic Functions</title><content type='html'>A function, f(x).  We can treat it as a black box - feed it x, and get back f(x).  But what if we have different sort of box - one with a big green button.  Push the button and it spits out an 'x' value.  The only way to ascertain f(x) is to keep track of the density of the values of 'x' that come out of the box - where f(x) is large, there will be lots of x's, and not so many where f(x) is small.&lt;br /&gt;&lt;p&gt;&lt;br /&gt;If we want to compute a normalized average over a weight function f(x), this output is exactly what we want.  Now suppose we want to compute derivatives of f(x) (the energy in QMC calculations).  In VMC, we can open the box and there is a analytic form for f(x) sitting there that we can take derivatives.  But in DMC, the situation may not be so simple - f(x) may be determined solely by the distribution of x's.  (I was trying to figure out how to compute the energy when doing DMC w/o a trial function)&lt;br /&gt;&lt;p&gt;&lt;br /&gt;One way to compute the derivative of f(x) is to keep a histogram of x's and take the derivative after the fact.   However, this solution seems noise prone, and not likely to scale well in multiple dimensions.&lt;br /&gt;&lt;p&gt;&lt;br /&gt;Each sample is a delta function. Integrals over the function become integrals over a sum of delta functions, centered around the sample points.  What if we replaced the delta functions by a gaussian? (since that is delta function in the limit of vanishing width).  Each point then represents a probability distribution with a finite width.&lt;br /&gt;&lt;p&gt;&lt;br /&gt;The first attempt at representing the ground state wavefunction of an infinite square well failed miserably - I could get any value of the energy I wanted by varying the width of the gaussians.   The problem is the boundary conditions - the wavefunction must vanish at the edges.  So then I tried using image gaussians (outside of the square well) to force the appropriate BC's.  That worked much better.   So well, in fact, that the value of the energy is quite good even when the center points are drawn from a uniform distribution, although I suspect this is largely a feature of simplicity of the potential).&lt;br /&gt;&lt;p&gt;&lt;br /&gt;So what now?&lt;br&gt;&lt;br /&gt;With this sort of representation, I'm wondering if it's possible to use a forward Euler scheme to propagate the distribution forward in time (ie use a first order approximation to the time derivative in the diffusion eqn.).  Either symbolically (ie, complicated formulas related to the original points) or by sampling (ie, generate a new set of points).&lt;br /&gt;&lt;p&gt;&lt;br /&gt;Normally, one thinks of using orthogonal function expansions, since linearly dependent functions don't add anything new to the function.  This sum of gaussians is definitely not orthogonal (well, they become more so at small widths), especially since the points are randomly distributed according to some distribution.  Hmm. This contrast seems relevant somehow.  The gaussians are all positive, and orthogonal functions usually have negative regions - I don't know if this is relevant or not.&lt;br /&gt;&lt;br /&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5063286-110075320170103256?l=quantum_mc.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://quantum_mc.blogspot.com/feeds/110075320170103256/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5063286&amp;postID=110075320170103256' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5063286/posts/default/110075320170103256'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5063286/posts/default/110075320170103256'/><link rel='alternate' type='text/html' href='http://quantum_mc.blogspot.com/2004/11/probabilistic-functions.html' title='Probabilistic Functions'/><author><name>Mark</name><uri>http://www.blogger.com/profile/03956296363343527391</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5063286.post-110022862108152200</id><published>2004-11-11T20:58:00.000-06:00</published><updated>2005-09-24T23:54:47.826-05:00</updated><title type='text'>Comments for Everyone.  A New Blog.</title><content type='html'>I turned on comments for everyone, not just registered users.&lt;br /&gt;&lt;p&gt;&lt;br /&gt;Also, feeling the need to speak of things other than QMC, I've started a different blog for such topics.  (I will continue posting here, I just wanted a place for non-QMC or non-MC related items).&lt;br /&gt;&lt;p&gt;&lt;br /&gt;[Edit - removed link to personal blog.  Email me if you really want to know]&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5063286-110022862108152200?l=quantum_mc.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://quantum_mc.blogspot.com/feeds/110022862108152200/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5063286&amp;postID=110022862108152200' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5063286/posts/default/110022862108152200'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5063286/posts/default/110022862108152200'/><link rel='alternate' type='text/html' href='http://quantum_mc.blogspot.com/2004/11/comments-for-everyone-new-blog.html' title='Comments for Everyone.  A New Blog.'/><author><name>Mark</name><uri>http://www.blogger.com/profile/03956296363343527391</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5063286.post-110022604518174518</id><published>2004-11-11T20:17:00.000-06:00</published><updated>2004-11-11T20:20:45.180-06:00</updated><title type='text'>Atomic and Molecular orbital applets</title><content type='html'>Here's a &lt;a href="http://artsandscience.concordia.ca/facstaff/a-c/bird/c241/c241.html"&gt;course page&lt;/a&gt; that contains some atomic and molecular orbital applets.  Look under the "Dry Laboratory Experiments", "D3" for atomic orbitals and "D4" for molecular orbitals.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5063286-110022604518174518?l=quantum_mc.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://quantum_mc.blogspot.com/feeds/110022604518174518/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5063286&amp;postID=110022604518174518' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5063286/posts/default/110022604518174518'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5063286/posts/default/110022604518174518'/><link rel='alternate' type='text/html' href='http://quantum_mc.blogspot.com/2004/11/atomic-and-molecular-orbital-applets.html' title='Atomic and Molecular orbital applets'/><author><name>Mark</name><uri>http://www.blogger.com/profile/03956296363343527391</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5063286.post-109954447909644022</id><published>2004-11-04T20:44:00.000-06:00</published><updated>2004-11-03T23:02:50.863-06:00</updated><title type='text'>DMC timestep and equilbration</title><content type='html'>I've been reading &lt;a href="http://www-personal.engin.umich.edu/~jpboyd/BOOK_Spectral2000.html"&gt;Chebyshev and Fourier Spectral Methods&lt;/a&gt; by J. P. Boyd.&lt;br /&gt;&lt;p&gt;&lt;br /&gt;In Chapter 12, p. 227, he points out that if we are only interested in the steady state, errors in the decay rate don't matter.&lt;br /&gt;&lt;p&gt;&lt;br /&gt;Chapter 13 talks about operator splitting, which looks very similar to how Diffusion Monte Carlo gets the short time approximation to the propagator.  Section 13.4 talks about consistency - basically timestep error in the steady state.&lt;br /&gt;&lt;p&gt;&lt;br /&gt;I had the realization that one could use large timesteps in DMC for the equilibration part, and smaller timesteps once equilibrium was reached.  More drastic population control measures are probably needed as well if large timesteps are used (at least I always had trouble maintaining a stable population of walkers if the timestep is too large).&lt;br /&gt;&lt;p&gt;&lt;br /&gt;This particular idea isn't terribly profound, but I'm finding it very enlighting to read about other methods for solving differential equations.  I also like the presentation level of this book - lots of practical, concrete considerations as well as descriptions of the consequences of various equations.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5063286-109954447909644022?l=quantum_mc.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://quantum_mc.blogspot.com/feeds/109954447909644022/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5063286&amp;postID=109954447909644022' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5063286/posts/default/109954447909644022'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5063286/posts/default/109954447909644022'/><link rel='alternate' type='text/html' href='http://quantum_mc.blogspot.com/2004/11/dmc-timestep-and-equilbration.html' title='DMC timestep and equilbration'/><author><name>Mark</name><uri>http://www.blogger.com/profile/03956296363343527391</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5063286.post-109954338656013410</id><published>2004-11-03T22:37:00.000-06:00</published><updated>2004-11-03T22:43:06.560-06:00</updated><title type='text'>Qumax - QMC code</title><content type='html'>I signed up for Google Alerts a while back, and today I got a notice about &lt;a href="http://attaccalite.altervista.org/qumax/index.php"&gt;Qumax&lt;/a&gt;, a Quantum Monte Carlo code.&lt;br /&gt;&lt;p&gt;&lt;br /&gt;I downloaded the code, but haven't tried compiling or running it yet.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5063286-109954338656013410?l=quantum_mc.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://quantum_mc.blogspot.com/feeds/109954338656013410/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5063286&amp;postID=109954338656013410' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5063286/posts/default/109954338656013410'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5063286/posts/default/109954338656013410'/><link rel='alternate' type='text/html' href='http://quantum_mc.blogspot.com/2004/11/qumax-qmc-code.html' title='Qumax - QMC code'/><author><name>Mark</name><uri>http://www.blogger.com/profile/03956296363343527391</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5063286.post-109893759526216884</id><published>2004-10-27T23:26:00.000-05:00</published><updated>2004-10-29T22:29:37.526-05:00</updated><title type='text'>Fermion Sign Problem Officially Hard</title><content type='html'>It now official: the fermion sign problem is hard.  Matthias Troyer and Uwe-Jens Wiese &lt;a href="http://www.arxiv.org/abs/cond-mat/0408370"&gt;present a proof&lt;/a&gt; that the fermion sign problem is NP-hard.  They do this by mapping the quantum problem to a spin glass model, which is known to be NP-complete.&lt;br /&gt;&lt;p&gt;&lt;br /&gt;Do I believe it?&lt;br /&gt;&lt;p&gt;&lt;br /&gt;Hmmm. The results presented deal with a discrete problem.  I'm not sure if the results apply to continuous systems as well or not.  The whole notion of NP-completeness and combinatorial complexity deals with discrete systems.  For continuous systems, &lt;a href="http://www.ibc-research.org/"&gt;information-based complexity (IBC)&lt;/a&gt; might be a better way of analyzing the problem.  Note that the "fruit-fly" of IBC research is multidimensional integration.&lt;br /&gt;&lt;p&gt;&lt;br /&gt;However, the distinction between continuous and discrete might not be important.  For instance, with global optimization, finding the locations of the local minima is "easy", but then one is left picking between many different discrete local minima to find the global minima (which makes it a potentially "hard" combinatorial problem - assuming the number of local minima grows exponentially with problem size).&lt;br /&gt;&lt;p&gt;&lt;br /&gt;I'm still perplexed as the origins of the difficulty of the FSP (actually, I don't understand the origin of difficulties for most NP problems.)  So a quick look into the form of the integrals is   in order.&lt;br /&gt;&lt;p&gt;&lt;br /&gt;We start with wanting the integral I = int f(x) dx, where x is really a vector of high dimension.  Monte Carlo fits the bill nicely, having error bounds independent of dimension.  But f(x) is strongly peaked - only small volumes contribute to most of the integral.  To be efficient, we need importance sampling.  The usually trick is to split f(x) into a product: p(x)g(x), where p(x) &gt;= 0.  Since p is positive, we can interpret it as a probability and use various sampling methods to get int p(x) g(x) dx / int p(x) dx.&lt;br /&gt;&lt;p&gt;&lt;br /&gt;We can get away with this in QMC by assuming that p(x) = psi^2(x), which is positive.  But in Diffusion Monte Carlo, p(x) = psi(x) phi(x), where psi(x) is a guess and phi(x) is the exact ground state wavefunction. Now psi and phi will not have zeros at exactly the same location, so p(x) will have some negative regions.&lt;br /&gt;&lt;p&gt;&lt;br /&gt;The trick for dealing with negative p(x) is to split it once again into: sgn(p) abs(p) and sample abs(p), and move sgn(p) over with g(x). The integral now looks like &lt;br /&gt;[int abs(p) sgn(p) g(x) / int abs(p)]/[int abs(p) sgn (p) / int abs(p)]&lt;br /&gt;&lt;p&gt;&lt;br /&gt;Here's where I get lost.  One source of the problem could the denominator - since it is the average of a signed quantity, it could be small (at least relative to the errors) and magnify errors in the numerator?  But the paper says that both the numerator and denominator have errors that grow exponentially in system size.  So the denominator is an irritant, but not the root cause.&lt;br /&gt;&lt;p&gt;&lt;br /&gt;The error of the average sign (again from the paper) is related to the exponential of the free energy difference between the fermionic problem (with p(x)) and bosonic problem (with abs(p(x)).  So the fermionic free energy is necessarily smaller because of cancellation induced by minus signs.  But I still don't see how this makes the problem hard.&lt;br /&gt;&lt;p&gt;&lt;br /&gt;Why not add a sufficiently large constant to p to make it postive?  Now there are no minus signs anywhere.  But the essential features of the integrand haven't changed - so it can't be a "sign" problem.   I guess I view the complexity of integration as coming from the unpredictable fluctations of the integrand - wildy fluctating integrands are "harder" to do than smooth integrands.  Adding a constant doesn't change this.&lt;br /&gt;&lt;p&gt;&lt;br /&gt;Perhaps the antisymmetry requirements produce a function that has nearly equal positive and negative parts.  Each one separately has a small relative error, but the nearly exact cancellation causes great magnification of the error (a well known numerical analysis bugaboo).  Thus, the experiment of adding a constant doesn't change anything - it's added equally to both parts, and cancels exactly.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5063286-109893759526216884?l=quantum_mc.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://quantum_mc.blogspot.com/feeds/109893759526216884/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5063286&amp;postID=109893759526216884' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5063286/posts/default/109893759526216884'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5063286/posts/default/109893759526216884'/><link rel='alternate' type='text/html' href='http://quantum_mc.blogspot.com/2004/10/fermion-sign-problem-officially-hard.html' title='Fermion Sign Problem Officially Hard'/><author><name>Mark</name><uri>http://www.blogger.com/profile/03956296363343527391</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5063286.post-109893113366376399</id><published>2004-10-27T19:33:00.000-05:00</published><updated>2004-10-27T23:25:08.490-05:00</updated><title type='text'>Lennard-Jones Server, Part II</title><content type='html'>Some more thoughts, in a Frequently Asked Questions (FAQ) format.  (Actually, no one has asked any questions, so maybe it should be Frequently Unasked Questions.  Or maybe not, given the acronym.  Perhaps I should call them Frequently Anticipated Questions.)&lt;br /&gt;&lt;p&gt;&lt;br /&gt;Q. Why remote computation - why not just download a program to the users computer?&lt;br /&gt;A. Have you ever downloaded software and tried to obtain all the dependencies?  Hopefully, the client program would be much simpler.  Other ideals are bug fixes and enhancements would take place on the server and automatically be picked up by the users (although this would require versioning to meet reproducibility requirements for researchers).  The general idea of web services is somewhat of a holy grail for business types - getting paid every time someone uses the service, or getting paid on a subscription basis.  Which is why word processing software is unlikely to take off as a web service any time soon.  Getting someone to pay for a Lennard-Jones server is also unlikely.&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;br /&gt;Q. Why not just have a web page? Like Google, Amazon, etc.&lt;br /&gt;A. A web service allows interfacing to these services under program control, which allows your computer to buy stuff on Amazon when it gets bored.&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;br /&gt;Q. Why a single component Lennard-Jones system?  It's not exactly a hotbed of research.&lt;br /&gt;A. No, but it is a testbed.  New techniques are often tested on simple systems, and benchmark results would be useful.  More importantly, it is a simple first test of the simulations over web services idea.  I can see expanding to more complicated classical systems and QMC later.&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;br /&gt;Q. Can you explain more about accumulating a database of properties?&lt;br /&gt;A. Yes.  Aggregating data is a noble and useful goal, but it requires careful vetting of the input data.  The idea behind a Lennard-Jones server is that users would only input physical parameters, not raw data.  The data aggregation could then be automated, since the data (ie, the output of the program) should be of good quality (or at least of known quality).&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;br /&gt;The particular example I have in mind is computing free energies and the phase diagram.  Computing a grid of pressures or energies at a number of state points is relatively easy, but computing free energies and such is harder - it can require integrating over a number of state points (if you use thermodynamic integration).  Hopeful as more state points get put into the system, the free energies get more accurate.  Calculations done during the idle time could be planned specifically to lower the errors on edges of the phases.&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;br /&gt;Now such a database will likely be inferior to targetted research trying to answer a particular question (ie, accurate freezing points, etc), but it seems like a good source of background information or a starting point.  Also, the background or baseline information would be in electronic form, and as such be more useful than in a paper. (Not that papers aren't important - the raw data needs to be intrepreted and understood)&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;br /&gt;Q. Who would be likely users for such a service?&lt;br /&gt;A. On the computation side, companies and researchers that use the results of simulations, but don't care about the details of the simulations.  For researchers in the particular field the web service covers, it might not be so useful (the whole "not outsourcing your core competency" thing), although it would be useful for benchmarking and comparison of results.&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;br /&gt;On the data side, having a good collection of properties for the desired system would be useful for everyone.&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;br /&gt;Q. What would you do if it were the late 90's?&lt;br /&gt;A. I would run out and register eSimulations.net.com and/or eWavefunctionsRUs.com, write a buzzword compliant business plan about the wonderful opportunies in B2C, B2B, R2B and R2R markets (the last two, made up on the spot,  are Reseacher to Business and Researcher to Researcher.), and how actual experiments in the real world are passe, and the new e-world of the internet will make the real world obsolete. And try to get lots of VC money and go public with an overhyped IPO.  Ah. For the good old days.&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5063286-109893113366376399?l=quantum_mc.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://quantum_mc.blogspot.com/feeds/109893113366376399/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5063286&amp;postID=109893113366376399' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5063286/posts/default/109893113366376399'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5063286/posts/default/109893113366376399'/><link rel='alternate' type='text/html' href='http://quantum_mc.blogspot.com/2004/10/lennard-jones-server-part-ii.html' title='Lennard-Jones Server, Part II'/><author><name>Mark</name><uri>http://www.blogger.com/profile/03956296363343527391</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5063286.post-109867594770428585</id><published>2004-10-24T22:44:00.000-05:00</published><updated>2004-10-24T22:45:47.703-05:00</updated><title type='text'>Comments enabled</title><content type='html'>I've enabled comments. Just for registered users for now.  &lt;br /&gt;And I've started adding titles to the posts. Enjoy&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5063286-109867594770428585?l=quantum_mc.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://quantum_mc.blogspot.com/feeds/109867594770428585/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5063286&amp;postID=109867594770428585' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5063286/posts/default/109867594770428585'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5063286/posts/default/109867594770428585'/><link rel='alternate' type='text/html' href='http://quantum_mc.blogspot.com/2004/10/comments-enabled.html' title='Comments enabled'/><author><name>Mark</name><uri>http://www.blogger.com/profile/03956296363343527391</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5063286.post-109859413038258852</id><published>2004-10-23T21:21:00.000-05:00</published><updated>2004-10-24T01:09:57.246-05:00</updated><title type='text'></title><content type='html'>&lt;h3&gt;Lennard-Jones Server&lt;/h3&gt;&lt;br /&gt;&lt;br /&gt;If I could write blog entries as funny as &lt;a href="http://www.neopoleon.com"&gt;Rory Blyth&lt;/a&gt;, I'd be famous.  Well, maybe not.  I'd have to draw cartoons, too. But to really be famous, I'd have to gratutiously link to &lt;a href="http://radio.weblogs.com/0001011/"&gt;Robert Scoble&lt;/a&gt;. (And get him to link back to this blog, the really hard part.) (For those who have non-computer-geek lives, Scoble wrote an article on how to &lt;a href="http://radio.weblogs.com/0001011/2004/09/19.html#a8241"&gt;get your blog noticed.&lt;/a&gt;)&lt;br /&gt;&lt;p&gt;&lt;br /&gt;The vaguely relevant part of that last paragraph is &lt;a href="http://neopoleon.com/blog/posts/8907.aspx"&gt;Rory's comments&lt;/a&gt; about &lt;a href="http://www.sellsbrothers.com/conference/"&gt;XML Dev Con 2004&lt;/a&gt;.  Some of the talks related to Web Services.&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;br /&gt;Web Services - what are they?  Zef Hemel has a good description of &lt;a href="http://www.zefhemel.com/archives/2004/10/21/distributed-systems-part-iv-the-service-oriented-model"&gt;Service Oriented Architecture&lt;/a&gt;, which basically means using web services (ie, Remote Procedure Calls over port 80) to construct an application.&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;br /&gt;That leads me to the Grid, of which web services seem to be a part. (But don't get me started on the popular analogy between the power grid and the computational grid.  It's seductive and appealing, and perhaps even useful at a very abstract level, but the details break down badly if you push it very far (see the &lt;a href="http://www.sciam.com/article.cfm?articleID=000B1833-21DF-1E64-A98A809EC5880105"&gt;Scientific American article&lt;/a&gt;, among others.)&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;br /&gt;The grid concept seems to encompass four different things (as far as I can tell)&lt;br /&gt;&lt;/p&gt;&lt;ol&gt;&lt;br /&gt;&lt;li&gt; Connecting geographically (and/or institutionally) separated supercomputers to work on a single calculation.&lt;br /&gt;&lt;/li&gt;&lt;li&gt; Harvesting idle cycles on desktop PC's&lt;br /&gt;&lt;/li&gt;&lt;li&gt; Running specific computations on remote machines (this is web services)&lt;br /&gt;&lt;/li&gt;&lt;li&gt; Running arbitrary computations on remote machines (like the &lt;a href="http://blogs.sun.com/roller/page/jonathan/20040925"&gt;recent Sun announcement&lt;/a&gt;, but other companies have offered similar services previously)&lt;br /&gt;&lt;/li&gt;&lt;/ol&gt;&lt;br /&gt;&lt;p&gt;&lt;br /&gt;Concerning items 3 and 4, I suspect web services will be more popular then running arbitrary computations remotely.  If you have enough computational or data requirements to entertain thoughts of rent-a-FLOP (or rent-a-MIP), you will care about the environment and how well the code is optimized for the target architecture (or at least how predictable the run time is).  But caring about such things makes buying "generic" computing power harder, or at least more complex.&lt;br /&gt;&lt;p&gt;&lt;br /&gt;But web services are (?) about hiding those nasty details.  The provider can optimize the code for the target architecture or other details, and the user need not worry.  It may be useful to divide the services into two kinds, one that requires lots of data, and the other that requires lots of compuations.  For data-heavy services, the provider has lots of specialized data that is updated frequently (think Google, Amazon, Ebay, or stock market info), and delivering the data + program to the user would impractical. (versus something like TurboTax, which contains lots of specialized knowledge that changes yearly, but is practical to deliver the data + program to the user's computer.  Although it can be and is offered over the web as well).  For computation heavy services, optimization for particular hardware, etc could be considered specialized knowledge as well (making the divisons less distinct), but I still think the division may be useful.&lt;br /&gt;&lt;p&gt;&lt;br /&gt;As a way of understanding web services, and grid concepts, I was thinking of a Lennard-Jones server.  A user could request properties of a single component system interacting via a Lennard-Jones potential for a given temperture/density/system size, the server would run the simulation and return the energy,pressure, g(r), and whatever else.  (It would require limits on the system size to keep from completely overloading the server).&lt;br /&gt;&lt;p&gt;&lt;br /&gt;The server could have other features, such a keeping a database of run results, and returning the simulation results nearest the requrest parameters.  Although I'm not sure this would work so well if one extended the idea to more complicated systems with larger parameter space.&lt;br /&gt;&lt;p&gt;&lt;br /&gt;In some ways, it's like a database of material properties, except that the properties are all generated by computation. So the database could be improved by further computation - if the server is idle it could work on reducing errors in various quantities. Although this might wreak havoc on reproduceability for users - good versioning would be needed.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5063286-109859413038258852?l=quantum_mc.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://quantum_mc.blogspot.com/feeds/109859413038258852/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5063286&amp;postID=109859413038258852' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5063286/posts/default/109859413038258852'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5063286/posts/default/109859413038258852'/><link rel='alternate' type='text/html' href='http://quantum_mc.blogspot.com/2004/10/lennard-jones-server-if-i-could-write.html' title=''/><author><name>Mark</name><uri>http://www.blogger.com/profile/03956296363343527391</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5063286.post-109794301677626594</id><published>2004-10-16T10:51:00.000-05:00</published><updated>2007-04-09T22:43:54.538-05:00</updated><title type='text'></title><content type='html'>&lt;h3&gt;3D Function Plotter&lt;/h3&gt;&lt;br /&gt;&lt;br /&gt;In the continuing quest to &lt;a href="http://quantum_mc.blogspot.com/2004_09_01_quantum_mc_archive.html#109432672173542592"&gt;visualize wavefunctions&lt;/a&gt;, I've put up the first version of a &lt;a href="http://www.markdewing.com/qmc/viz/viz.html"&gt;3D function plotter.&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5063286-109794301677626594?l=quantum_mc.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://quantum_mc.blogspot.com/feeds/109794301677626594/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5063286&amp;postID=109794301677626594' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5063286/posts/default/109794301677626594'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5063286/posts/default/109794301677626594'/><link rel='alternate' type='text/html' href='http://quantum_mc.blogspot.com/2004/10/3d-function-plotter-in-continuing.html' title=''/><author><name>Mark</name><uri>http://www.blogger.com/profile/03956296363343527391</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5063286.post-109652082140203178</id><published>2004-09-29T23:55:00.000-05:00</published><updated>2004-09-30T00:07:01.403-05:00</updated><title type='text'></title><content type='html'>&lt;h3&gt;How to Integrate a Derivative&lt;/h3&gt;&lt;br /&gt;In the previous post, I had tried to use derivatives to improve the estimate for a single sample, but that turned out not to work very well.  That was an approximation.  To use the derivative exactly, the definition is f(x) - f(0) = int_0^x f`(y) dy.&lt;br /&gt;&lt;p&gt;&lt;br /&gt;Does this have a practical application? After all, if we do this on the example in the previous post, we go from a single integral to a double integral - it looks like we're making the problem harder!  Ah, but this is Monte Carlo.  The convergence rate is independent of dimensionality.  So adding more integrals doesn't necessarily make the problem harder.&lt;br /&gt;&lt;p&gt;&lt;br /&gt;The final error does, however, depend on the intrinsic variance of the integral.  In this example, this variance gets much worse, so making this transformation is not a good idea.  In general, derivatives will vary more than the original function, so this technique is not likely useful in general.  Unless the transformed problem has some other desirable features, like better importance sampling or something.&lt;br /&gt;&lt;p&gt;&lt;br /&gt;Finally, I should note that something similar to this is used in thermodynamic integration to get free energies.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5063286-109652082140203178?l=quantum_mc.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://quantum_mc.blogspot.com/feeds/109652082140203178/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5063286&amp;postID=109652082140203178' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5063286/posts/default/109652082140203178'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5063286/posts/default/109652082140203178'/><link rel='alternate' type='text/html' href='http://quantum_mc.blogspot.com/2004/09/how-to-integrate-derivative-in.html' title=''/><author><name>Mark</name><uri>http://www.blogger.com/profile/03956296363343527391</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5063286.post-109634322725988089</id><published>2004-09-27T18:45:00.000-05:00</published><updated>2004-09-27T22:47:07.260-05:00</updated><title type='text'></title><content type='html'>&lt;h3&gt;Sometimes it doesn't work&lt;/h3&gt;&lt;br /&gt;&lt;br /&gt;The other day I had an idea about trying to improve MC samples.  The Monte Carlo method for evaluating an integral is the average of a set of samples.  Each sample can be considered a very crude approximation to the integral - each sample approximates the integrand as a constant.  What if we could make each sample a better approximation, say by using a the derivative information at the sample point?&lt;br /&gt;&lt;p&gt;&lt;br /&gt;Another consideration is that the intrinsic variance of the integral (int [f(x)-ave(f)]^2) controls the accuracy of the MC approximation.  If we could smooth the integrand, and lower the variance, the MC integral would be better.   Perhaps expanding the integral in a series around the sample point and integrating would help smooth it? &lt;br /&gt;&lt;p&gt;&lt;br /&gt;Then reality struck.  I tried it on v(x)*exp(-v(x)/T), with v(x) = 1/x^12.  I made the expansion and integrated in an interval from [x-h,x+h], and graphed the result - it was clearly *not* smoother than the original function.  It was also clear that the expansion was an approximation, and only correct in the limit of small h.&lt;br /&gt;&lt;p&gt;&lt;br /&gt;Upon further reflection, I realized a few things.  One is that each MC sample may be a crude approximation to the integral, but it has the important property of being unbiased (ie, all the errors will average to zero).  Any improvement in the sample value needs to retain this property.&lt;br /&gt;&lt;p&gt;&lt;br /&gt;Secondly, smoothing would be most valuable when the integrand is rapidly changing.  And this is just the condition where the Taylor expansion is likely to be the least accurate. I suppose that any local smoothing of the integrand will suffer from this sort of problem.&lt;br /&gt;&lt;p&gt;&lt;br /&gt;Sometimes, it doesn't work.  Ah, but that's what research is all about.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5063286-109634322725988089?l=quantum_mc.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://quantum_mc.blogspot.com/feeds/109634322725988089/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5063286&amp;postID=109634322725988089' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5063286/posts/default/109634322725988089'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5063286/posts/default/109634322725988089'/><link rel='alternate' type='text/html' href='http://quantum_mc.blogspot.com/2004/09/sometimes-it-doesnt-work-other-day-i.html' title=''/><author><name>Mark</name><uri>http://www.blogger.com/profile/03956296363343527391</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5063286.post-109432672173542592</id><published>2004-09-04T14:35:00.000-05:00</published><updated>2007-04-09T22:44:31.003-05:00</updated><title type='text'></title><content type='html'>&lt;h3&gt;Visualizing Wavefunctions&lt;/h3&gt;&lt;br /&gt;&lt;br /&gt;I've started learning VTK, Python, and Tk in order to look into visualizing wavefunctions.  So far, I've made an application that plots a function of x and y.  The user can change the plotted function in an edit box.  Get the 2D plotter &lt;a href="http://www.markdewing.com/qmc/viz/viz.html"&gt;here&lt;/a&gt;.&lt;br /&gt;&lt;p&gt;&lt;br /&gt;I've also got a prototype application that plots a function of 3 variables, and lets the user choose a slice (a plane) through the displayed volume, and the application plots the 2D slice in a view that looks very much like the 2D plotter.  But it's not quite ready for public consumption yet.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5063286-109432672173542592?l=quantum_mc.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://quantum_mc.blogspot.com/feeds/109432672173542592/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5063286&amp;postID=109432672173542592' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5063286/posts/default/109432672173542592'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5063286/posts/default/109432672173542592'/><link rel='alternate' type='text/html' href='http://quantum_mc.blogspot.com/2004/09/visualizing-wavefunctions-ive-started.html' title=''/><author><name>Mark</name><uri>http://www.blogger.com/profile/03956296363343527391</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5063286.post-109108067032462957</id><published>2004-07-29T00:39:00.000-05:00</published><updated>2004-07-31T18:18:00.693-05:00</updated><title type='text'></title><content type='html'>&lt;h3&gt;Welcome to the Metropolis Disco - How do you move &lt;em&gt;your&lt;/em&gt; particles?&lt;/h3&gt;&lt;br /&gt;  Out on the dance floor tonight we have the spotlight on two papers on improving the efficiency of Monte Carlo moves.  But first, a brief summary of the results of Peskun's theorem (Both papers mention it.).  The Metropolis algorithm takes a trial move and accepts or rejects the move with some probability.  If the move is rejected, that location is used in the average again.  Rejected moves will increase the autocorrelation, and so increase the variance of the resulting average.   Peskun's theorem validates this intuition, under certain conditions.   So the result is that, just like dancing, moving is better than standing still.&lt;br /&gt;&lt;br /&gt;  The first paper is &lt;a href="http://www.arxiv.org/abs/cond-mat/0407513"&gt;Delayed Rejection Variational Monte Carlo&lt;/a&gt; by Bressanini, Morosi, and Tarasco.   The problem is that for best efficiency, moves near an atomic nucleus should have small step, and moves far away from a nucleus should have a large step.  If a move is rejected, it is likely that the step size was too large.  One could imagine a dynamic or adaptive step size method that lowers the step size when there are lots of rejections and increases it when there are lots of acceptances (*).  This paper does something slightly different - when a move is rejected, it is retried with a smaller step, but the original rejected move is not made part of the average.  The acceptance probability is adjusted to take this into account.   So there is an increase in the amount of time it takes for a move, but that is made up for by a larger decrease in the autocorrelation time.&lt;br /&gt;&lt;br /&gt;  The second paper is &lt;a href="http://www.arxiv.org/abs/cond-mat/0405150"&gt;Optimal Monte Carlo Updating&lt;/a&gt; by Pollet, Rombouts, Van Houcke, and Heyde.  They work with discrete systems, and introduce a a procedure called "Metropolizing" - which is to take a  move rule (eg, heat bath) and trasform it to a new, more efficient transition matrix.  This process can be applied repeated until there is only one non-zero diagonal element, resulting in a very efficient transition matrix (For single site updating rules).&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;(*) I'm not entirely sure a simple dynamic step size method would satisfy detailed balance.  I think it would, but that should be checked.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5063286-109108067032462957?l=quantum_mc.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://quantum_mc.blogspot.com/feeds/109108067032462957/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5063286&amp;postID=109108067032462957' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5063286/posts/default/109108067032462957'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5063286/posts/default/109108067032462957'/><link rel='alternate' type='text/html' href='http://quantum_mc.blogspot.com/2004/07/welcome-to-metropolis-disco-how-do-you.html' title=''/><author><name>Mark</name><uri>http://www.blogger.com/profile/03956296363343527391</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5063286.post-109044427647443305</id><published>2004-07-21T15:46:00.000-05:00</published><updated>2004-07-21T16:11:16.473-05:00</updated><title type='text'></title><content type='html'> &lt;h3&gt;More Graphic Card Computations&lt;/h3&gt;&lt;br /&gt;&lt;br /&gt;There's a site, &lt;a href="http://www.gpgpu.org"&gt;GPGPU&lt;/a&gt; (General Purpose computation on Graphics Processing Units), dedicated to interesting things one can do with a graphics card. (Well, there's always graphics, but using things for their intended purpose can get boring :)&lt;br /&gt;&lt;br /&gt;Last fall, I wondered about the possiblity of doing &lt;a href="http://quantum_mc.blogspot.com/2003_10_01_quantum_mc_archive.html#106564376448447219"&gt;Monte Carlo on the graphics card&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;On the GPGPU site there's a link to a paper about doing Ising model and percolation simulations on the graphics card (&lt;a href="http://www.ccd.bnl.gov/~tomov/MonteCarlo/"&gt;Benchmarking and Implementation of Probability-Based Simulations on Programmable Graphics Cards&lt;/a&gt;).  The work is primarily for proof of concept and benchmarking, with an eye towards lattice QCD simulations eventually.  Hmm.  Play a killer game of Quake *and* uncover fundamental secrets of the universe - what a combination!&lt;br /&gt;&lt;br /&gt;I can imagine students requesting the latest "Ising co-processors" so they can "make progress on their thesis" when Doom 3 comes out. (Err, maybe they need to leave off that last part when making the request).&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5063286-109044427647443305?l=quantum_mc.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://quantum_mc.blogspot.com/feeds/109044427647443305/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5063286&amp;postID=109044427647443305' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5063286/posts/default/109044427647443305'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5063286/posts/default/109044427647443305'/><link rel='alternate' type='text/html' href='http://quantum_mc.blogspot.com/2004/07/more-graphic-card-computations-theres.html' title=''/><author><name>Mark</name><uri>http://www.blogger.com/profile/03956296363343527391</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5063286.post-108442406557746598</id><published>2004-05-12T23:47:00.000-05:00</published><updated>2004-05-12T23:54:25.576-05:00</updated><title type='text'></title><content type='html'>&lt;h3&gt;PIMC live&lt;/h3&gt;&lt;br /&gt;  Check out the &lt;a href="http://physics.asu.edu/shumway/tutorials.html"&gt;Path Integral simulation applet&lt;/a&gt; on John Shumway's page.  You can change the temperature and see the paths localize at high temperature and spread out at low temperature.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5063286-108442406557746598?l=quantum_mc.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://quantum_mc.blogspot.com/feeds/108442406557746598/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5063286&amp;postID=108442406557746598' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5063286/posts/default/108442406557746598'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5063286/posts/default/108442406557746598'/><link rel='alternate' type='text/html' href='http://quantum_mc.blogspot.com/2004/05/pimc-live-check-out-path-integral.html' title=''/><author><name>Mark</name><uri>http://www.blogger.com/profile/03956296363343527391</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5063286.post-108209508797744028</id><published>2004-04-16T01:03:00.000-05:00</published><updated>2004-04-16T01:03:50.670-05:00</updated><title type='text'></title><content type='html'>&lt;h3&gt;Pseudorandom number generators and the stock market&lt;/h3&gt;&lt;br /&gt;&lt;br /&gt;As correlations are discovered in psuedorandom number generators used in simulations, the correlations are removed by creating better generators.  So as time marches on, the state of the art PRNG's should be getting more and more random.&lt;br /&gt;&lt;p&gt;&lt;br /&gt;As correlations are discovered in the stock market, they are removed as the resevoir of correlation is drained for its profit. So the stock market should be getting more and more random as time goes on (especially as faster computers and more sophisticated statistical techniques are used)&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5063286-108209508797744028?l=quantum_mc.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://quantum_mc.blogspot.com/feeds/108209508797744028/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5063286&amp;postID=108209508797744028' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5063286/posts/default/108209508797744028'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5063286/posts/default/108209508797744028'/><link rel='alternate' type='text/html' href='http://quantum_mc.blogspot.com/2004/04/pseudorandom-number-generators-and.html' title=''/><author><name>Mark</name><uri>http://www.blogger.com/profile/03956296363343527391</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5063286.post-107906726908406224</id><published>2004-03-11T22:59:00.000-06:00</published><updated>2004-03-16T01:09:39.793-06:00</updated><title type='text'></title><content type='html'>&lt;h3&gt;Experimentally switching between liquid and solid phases?&lt;/h3&gt;&lt;br /&gt;&lt;br /&gt;Looking at &lt;a href="http://quantum_mc.blogspot.com/2004_02_01_quantum_mc_archive.html#107593187903927736"&gt;Grochola's free energy path&lt;/a&gt;, I thought it was a nice computational technique.&lt;br /&gt;&lt;p&gt;&lt;br /&gt;The March 2004 issue of &lt;a href="http://www.physicstoday.org/"&gt;Physics Today&lt;/a&gt; has an article on controlling atoms and ions in optical traps (it's actually about using these for quantum information processing). On page 41, it describes putting the atoms in a optical lattice.  The depth of the wells and the hopping matrix elements can be controlled by varying the intensity of the lasers creating the lattice.&lt;br /&gt;&lt;p&gt;&lt;br /&gt;This seems like one could experimentally switch between solid and liquid states without going through a phase transition.&lt;br /&gt;&lt;p&gt;&lt;br /&gt;There are some differences - I don't know if they are important or not.  First, the experimental setup is a quantum system, Grochola's paper describes a classical system.  Second, the confining potential is different.  In the experimental setup, atoms are confined to any lattice site, but are not tethered to a particular lattice site.&lt;br /&gt;&lt;p&gt;&lt;br /&gt;The Physics Today article mentions a Mott insulator transition when the confining potential becomes strong enough.  This transition seems due to the superfluid (quantum) nature of the liquid state.  If the experiment were performed on a non-superfluid system, this transition would not happen ??&lt;br /&gt;&lt;p&gt;&lt;br /&gt;Update (3/16/2004):  I forgot the final stage in the path - turning off the confining potential to get a stable solid state.  I'm guessing the lattice spacing of the optical lattice is at least the laser wavelength or greater, so it's much larger than the lattice spacing of a normal solid.  But some atoms can have their scattering length tuned - could it be made large enough to be comparable to the optical lattice spacing?  In that case the atoms would behave as hard spheres (most importantly, there would likely not be enough attraction to keep the solid together), so an external potential would be required.  Most of these setups seem to generate a harmonic confining potential (a box-like potential seems much harder to generate??), so the question is - what is the behavior of hard spheres in a harmonic potential?&lt;br /&gt;&lt;p&gt;&lt;br /&gt;For this system, there are two parameters - the number of particles and the strength of the external potential.   I suspect there would be three regimes - one all liquid, one with a solid center surrounded by a liquid exterior, and one would be all solid.  To take the thermodynamic (large N) limit, it seems that one would need to increase the particle number and decrease the external potential strength simultaneously to keep the central density or pressure constant (otherwise the pressure/density at the center would increase with added particles).  Or maybe such a limit doesn't exist?&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5063286-107906726908406224?l=quantum_mc.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://quantum_mc.blogspot.com/feeds/107906726908406224/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5063286&amp;postID=107906726908406224' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5063286/posts/default/107906726908406224'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5063286/posts/default/107906726908406224'/><link rel='alternate' type='text/html' href='http://quantum_mc.blogspot.com/2004/03/experimentally-switching-between.html' title=''/><author><name>Mark</name><uri>http://www.blogger.com/profile/03956296363343527391</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5063286.post-107646129531534743</id><published>2004-02-11T23:59:00.000-06:00</published><updated>2005-12-03T10:48:54.530-06:00</updated><title type='text'>The Way of Antisymmetry</title><content type='html'>The traditional QMC wavefunction is the product of a determinant of single particle orbitals and a Jastrow factor (which contains the electron-electron correlation).  The determinant ensures the required spatial antisymmetry of the wavefunction, and is computable in O(N&lt;sup&gt;3&lt;/sup&gt;) time (where N is the number of electrons).  But it is not the most general form possible.  &lt;p&gt;&lt;br /&gt;The most general form is obtained by explicitly antisymmetrizing: summing the values of a function with all possible permutations of the electron coordinates (and multiplying by the sign appropriate for the permutation).  For example, with 2 particles and a function f(r&lt;sub&gt;1&lt;/sub&gt;,r&lt;sub&gt;2&lt;/sub&gt;), the antisymmetrized form is f(r&lt;sub&gt;1&lt;/sub&gt;,r&lt;sub&gt;2&lt;/sub&gt;) - f(r&lt;sub&gt;2&lt;/sub&gt;,r&lt;sub&gt;1&lt;/sub&gt;).&lt;br /&gt;&lt;p&gt;&lt;br /&gt;Unfortunately, the number of terms is N!. (The determinant form is obtained by applying this procedure when the function has the special form of the product of functions that each depend only on a single electron coordinate - these functions are the single particle orbitals.  In the two particle example, f = f&lt;sub&gt;1&lt;/sub&gt;(r&lt;sub&gt;1&lt;/sub&gt;)f&lt;sub&gt;2&lt;/sub&gt;(r&lt;sub&gt;2&lt;/sub&gt;).  The antisymmetrized form is f&lt;sub&gt;1&lt;/sub&gt;(r&lt;sub&gt;1&lt;/sub&gt;)f&lt;sub&gt;2&lt;/sub&gt;(r&lt;sub&gt;2&lt;/sub&gt;) - f&lt;sub&gt;1&lt;/sub&gt;(r&lt;sub&gt;2&lt;/sub&gt;)f&lt;sub&gt;2&lt;/sub&gt;(r&lt;sub&gt;1&lt;/sub&gt;), which is the determinant of  a matrix.)&lt;br /&gt;&lt;p&gt;&lt;br /&gt;  Dario Bressanini, Massimo Mella, Gabriele Morosi, and Luca Bertini have several papers using this form of the wavefunction for small molecules, and they get very good results.   The papers can be found on Massimo Mella's publication list (edit 12/3/2005 - removed nonworking link). They are (this may not be a complete list):&lt;br /&gt;&lt;ul&gt;&lt;br /&gt; &lt;li&gt; Many-electron correlated exponential wavefunctions. A Quantum Monte Carlo application to H2 and He2+&lt;br&gt;&lt;br /&gt;Chemical Physics Letters 240, 566 (1995)&lt;br&gt;&lt;br /&gt;Paper available at this &lt;a href="http://citeseer.ist.psu.edu/267607.html"&gt;Citeseer page&lt;/a&gt;&lt;br&gt;&lt;br /&gt;&lt;li&gt; Nonadiabatic wavefunctions as linear expansions of correlated exponentials. A Quantum Monte Carlo application to H2+ and Ps2&lt;br&gt;&lt;br /&gt;Chem. Phys. Lett. 272, 370 (1997)&lt;br&gt;&lt;br /&gt;Paper available at this &lt;a href="http://citeseer.ist.psu.edu/279388.html"&gt;Citeseer page&lt;/a&gt;&lt;br&gt;&lt;br /&gt;&lt;li&gt;Linear expansions of correlated functions: a variational Monte Carlo case study&lt;br&gt;&lt;br /&gt;Int. J. Quantum. Chem. 74, 23 (1999)  &lt;br&gt;&lt;br /&gt;Paper available at this &lt;a href="http://citeseer.ist.psu.edu/521560.html"&gt;Citeseer page&lt;/a&gt;&lt;br&gt;&lt;br /&gt;&lt;li&gt;Explicitly correlated trial wave functions in quantum Monte Carlo calculations of excited state of Be and Be-&lt;br&gt;&lt;br /&gt;J. Phys. B, (2001)&lt;br /&gt;&lt;/ul&gt;&lt;br /&gt;  &lt;p&gt;&lt;br /&gt;Not all N! terms will give a significant contribution to the result.  Is it possible to use techniques similar to O(N) approaches to reduce the number of terms?  Is it possible to sample terms from the sum?  These might have trouble near the nodes, since the wavefunction vanishes due to the cancelation of all the terms.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5063286-107646129531534743?l=quantum_mc.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5063286/posts/default/107646129531534743'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5063286/posts/default/107646129531534743'/><link rel='alternate' type='text/html' href='http://quantum_mc.blogspot.com/2004/02/way-of-antisymmetry.html' title='The Way of Antisymmetry'/><author><name>Mark</name><uri>http://www.blogger.com/profile/03956296363343527391</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author></entry><entry><id>tag:blogger.com,1999:blog-5063286.post-107653136368784522</id><published>2004-02-11T14:39:00.000-06:00</published><updated>2004-02-11T14:39:19.013-06:00</updated><title type='text'></title><content type='html'>&lt;h3&gt;DMC of porphyrin&lt;/h3&gt;&lt;br /&gt;An all electron calculation of a large molecule (large by QMC standards, anyway): &lt;br /&gt;&lt;a href="http://link.aip.org/link/?jcp/120/3049"&gt;Quantum Monte Carlo for electronic excitations of free-base porphyrin&lt;/a&gt; by Alan Aspuru-Guzik, Ouafae El Akramine, Jeffrey Grossman, and William Lester.  The porphyrin they used has the formula C&lt;sub&gt;20&lt;/sub&gt; N&lt;sub&gt;4&lt;/sub&gt; H&lt;sub&gt;14&lt;/sub&gt;,  so 168 electrons.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5063286-107653136368784522?l=quantum_mc.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://quantum_mc.blogspot.com/feeds/107653136368784522/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5063286&amp;postID=107653136368784522' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5063286/posts/default/107653136368784522'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5063286/posts/default/107653136368784522'/><link rel='alternate' type='text/html' href='http://quantum_mc.blogspot.com/2004/02/dmc-of-porphyrin-all-electron.html' title=''/><author><name>Mark</name><uri>http://www.blogger.com/profile/03956296363343527391</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5063286.post-107593187903927736</id><published>2004-02-04T16:10:00.000-06:00</published><updated>2004-02-04T16:10:24.733-06:00</updated><title type='text'></title><content type='html'>&lt;h3&gt;Solid vs. Liquid, The Free Energy Battle&lt;/h3&gt;&lt;br /&gt;Determining the free energy difference between the solid and liquid states is essential for accurately mapping the phase diagram of a substance.  Typically, one determines the free energies of the solid and liquid states through separate thermodynamic integrations, where each integration has one end point connected to a state with an analytically known free energy.  In the solid state, the Einstein crystal (springs attaching particles to lattice sites) is often used as a starting point.  In the liquid state, the low density gas can be used as an end point.  Other more complicated scalings of the potential are also possible for the integration path.&lt;br /&gt;&lt;p&gt;&lt;br /&gt; A direct integration path between the solid and liquid states would be useful.&lt;br /&gt;Gregory Grochola has published one such path in "Constrained fluid lambda-integration: Constructing a reversible thermodynamic path between the solid and liquid state"&lt;a href="http://link.aip.org/link/?jcp/120/2122"&gt;(JCP 120,  2122)&lt;/a&gt;.&lt;br /&gt;&lt;p&gt;&lt;br /&gt;The basic path is to start with the liquid state and turn off the intermolecular potential. Then turn on a potential constraining particles to lattice sites (He used a Gaussian potential).   The last step is to turn off the lattice potential while turning the intermolecular potential back on.&lt;br /&gt;&lt;p&gt;&lt;br /&gt;He mentions at the end that this method is not very computationally efficient.  I would expect using &lt;a href="http://quantum_mc.blogspot.com/2003_02_01_quantum_mc_archive.html#89466798"&gt;Bennett's method&lt;/a&gt; for free energy differences would cut down on the number of intermediate states needed.&lt;br /&gt;&lt;p&gt;&lt;br /&gt;Questions&lt;br /&gt; &lt;ol&gt;&lt;br /&gt;   &lt;li&gt; Compare and contrast this path with the phase switching Monte Carlo technique (there's a reference in the article)&lt;br /&gt;   &lt;li&gt; Thermodynamic integration requires there be no phase transitions on the path.  Is it immediately obvious that this path has no transitions?  Under what conditions, if any, would a phase transition occur on the path?&lt;br /&gt; &lt;/ol&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5063286-107593187903927736?l=quantum_mc.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://quantum_mc.blogspot.com/feeds/107593187903927736/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5063286&amp;postID=107593187903927736' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5063286/posts/default/107593187903927736'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5063286/posts/default/107593187903927736'/><link rel='alternate' type='text/html' href='http://quantum_mc.blogspot.com/2004/02/solid-vs.html' title=''/><author><name>Mark</name><uri>http://www.blogger.com/profile/03956296363343527391</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5063286.post-107498231397860379</id><published>2004-01-24T16:11:00.000-06:00</published><updated>2004-01-24T16:30:47.936-06:00</updated><title type='text'></title><content type='html'>&lt;h3&gt;Hard Spheres on the Move&lt;/h3&gt;&lt;br /&gt;Cluster algorithms increase efficiency for systems on a lattice by flipping large numbers of connected spins at once.  In &lt;a href ="http://www.arxiv.org/abs/cond-mat/0311623"&gt;"Cluster Monte Carlo algorithms"&lt;/a&gt;, Werner Krauth summarizes work on how such algorithms can be used in a continuum hard sphere simulation.&lt;br /&gt;&lt;p&gt;&lt;br /&gt;The basic idea is to rotate particles by &amp;pi around a randomly chosen axis. (The key observation is that this transformation is its own inverse).   A practical algorithm (the pocket algorithm) chooses a collection of particles that can be rotated without any hard spheres overlapping.  It starts with a single particle and rotates it.  If it overlaps with any other particles, they are added to the collection.  Then the new particles are tested in the same way, and the collection is built up of all the particles that need to be rotated to prevent any overlaps.&lt;br /&gt;&lt;p&gt;&lt;br /&gt;At high densities, this algorithm will fail because the pocket cluster will contain all (or most) of the particles in the system, and simply rotate the entire configuration.   Despite this limitation, there are systems where these moves are useful (see the paper for some examples).&lt;br /&gt;&lt;p&gt;&lt;br /&gt;On another subject, suppose you wanted to keep the trial box size fixed, and see how the dynamics varied with density (which would be useful if one were studying the actual MC dynamics)  At higher densities, the efficiency would get quite bad.  Hirosi Watanabe, et al tackle this problem in &lt;a href="http://www.arxiv.org/abs/cond-mat/0312548"&gt;A rejection-free Monte Carlo method for the hard-disk system&lt;/a&gt;.   They use geometry rather than random sampling to determine the allowable move area (and acceptance probability).  To actually choose a point, they use a rejection method (it's not clear why this method is called "rejection-free", then.  Maybe because the rejections are not essential for maintaining detailed balance, and rejected moves don't need to be included in the average.).  At the step of choosing a new point, the area they choose from is greatly reduced from the original trial area.&lt;br /&gt;&lt;br /&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5063286-107498231397860379?l=quantum_mc.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://quantum_mc.blogspot.com/feeds/107498231397860379/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5063286&amp;postID=107498231397860379' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5063286/posts/default/107498231397860379'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5063286/posts/default/107498231397860379'/><link rel='alternate' type='text/html' href='http://quantum_mc.blogspot.com/2004/01/hard-spheres-on-move-cluster.html' title=''/><author><name>Mark</name><uri>http://www.blogger.com/profile/03956296363343527391</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5063286.post-107121161206198804</id><published>2003-12-12T00:46:00.000-06:00</published><updated>2003-12-14T16:02:32.903-06:00</updated><title type='text'></title><content type='html'>&lt;h3&gt;Reducing the Variance&lt;/h3&gt;&lt;br /&gt;Assaraf and Caffarel have published a couple of papers (&lt;a href="http://link.aip.org/?jcp/119/10536"&gt;JCP 119, 10536&lt;/a&gt; and &lt;a href="http://link.aip.org/?jcp/113/4028"&gt;JCP 113, 4028&lt;/a&gt;)  about reducing the variance for general estimators in QMC.   The VMC energy has the well known zero variance property - the variance goes to zero as the trial wavefunction approaches an eigenstate.  Through a "renormalization" , the authors show how to extend this property to quantities other than the energy.&lt;br /&gt;&lt;p&gt;&lt;br /&gt;The basic approach seems to be to add a term (with zero average) to the bare estimator.  Then that added term can be optimized to reduce the variance.  Their derivation starts with the Hellmann-Feynman theorem, but this seems confusing to me. &lt;br /&gt;&lt;p&gt;&lt;br /&gt;Why not start with the new estimator, O tilde = O + B. ("O tilde" and "O" are notations from the paper. "B" is my own notation for representing all the added terms)  Then we demand &amp;lt B &amp;gt = 0, and use a Lagrange multiplier to enforce it while optimizing the variance (&amp;lt(O+B)^2&amp;gt - &amp;lt O+B&amp;gt^2)?&lt;br /&gt;&lt;p&gt;&lt;br /&gt;Their paper gives a particular form for B, that ensures the &amp;lt B&amp;gt=0 constraint is met (or at least that  &amp;lt B &amp;gt vanishes as the trial wavefunction approaches the ground state).&lt;br /&gt;&lt;p&gt;&lt;br /&gt;Can this approach be used to reduce the variance in classical Monte Carlo as well?  In principle, B could optimized  in that case as well - the hard part is finding a special form as in Quantum Monte Carlo.&lt;br /&gt;&lt;p&gt;&lt;br /&gt;Added thoughts (12/14/2003):  The primary application of this method is to forces, which are plagued by an infinite variance in QMC.  This looks a like good way to improve computations of the force.&lt;br /&gt;&lt;p&gt;&lt;br /&gt;The paper looks at average values and variances as functions (or at least the polynomial order) of delta psi (the diference between the exact ground state and the trial wavefunction).  For general (non-energy) estimators, the bias (or error) in the average value is linear in delta psi, and the variance is constant.  Using their procedure, the error is quadratic and the variance is linear.  It appears the added terms (B) cancel out the leading error terms in the estimator.  The question is then, why stop at the leading order?  Can a similar process by applied to cancel out the quadratic term in the average ??&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5063286-107121161206198804?l=quantum_mc.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://quantum_mc.blogspot.com/feeds/107121161206198804/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5063286&amp;postID=107121161206198804' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5063286/posts/default/107121161206198804'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5063286/posts/default/107121161206198804'/><link rel='alternate' type='text/html' href='http://quantum_mc.blogspot.com/2003/12/reducing-variance-assaraf-and-caffarel.html' title=''/><author><name>Mark</name><uri>http://www.blogger.com/profile/03956296363343527391</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5063286.post-107058344590509021</id><published>2003-12-04T18:17:00.000-06:00</published><updated>2003-12-04T18:22:47.216-06:00</updated><title type='text'></title><content type='html'>&lt;h3&gt;Free Energy Chronicles&lt;/h3&gt;&lt;br /&gt; Free energy calculations are annoyingly difficult. Computing averages with Metropolis is relatively easy,&lt;br /&gt;but the free energy is hard to get.  The usual method is thermodynamic integration over a path from a state of known free energy to the desired state.  (Maybe it's the ensemble averages that are anomalously easy, making other quantities seem difficult by comparison)  In addition, some other aspects about free energy calculations are bothering me as well.&lt;br /&gt;&lt;p&gt;&lt;br /&gt;  The typical example for explaining Monte Carlo integration is to compute the area of an irregularly shaped field or pond by throwing rocks at it.  But then computing the area (volume, free energy, whatever) is actually quite difficult in practice.  Of course in this example, one has to compare the rocks falling in desired area to those falling in an enclosing area that can be computed analytically, so it's still computing the difference between two states.&lt;br /&gt;&lt;p&gt;&lt;br /&gt;   Another issue that bothers my intuition is that if I were to wander around in a field I would have some idea how big the field is based on my wanderings.  In other words, why can't we get the area from properties of the random walk.  This could simply be pushing the analogy too far.  A person wandering is not undergoing a truly random walk.  They would likely walk in single direction until hitting an edge and then change direction. So imagine riding an out-of-control Segway around a field - would you still get a sense of the size of the field.&lt;br /&gt;&lt;p&gt;&lt;br /&gt;  Additionally, a person is able to see the edges.  So imagine being in a corn field (I am in central Illinois, after all - others can imagine a forest, with very soft trees) on an out-of-control Segway.  Would it still be possible to get an idea of how big the field is based on the path taken and how often you bump into the edge?&lt;br /&gt;&lt;p&gt;&lt;br /&gt; So I'd like to look into some of the properties of random walks - how much information can be extracted.  Are there theoretical limits?  Can we change the random walk or come up with different estimators that would let us compute the area?&lt;br /&gt;&lt;p&gt;&lt;br /&gt;  In order to investigate concrete but simple systems, I'm thinking of a series of systems to make the problem increasingly realistic for physical systems.  The simplest and easiest to think about the area of an irregular region.  More realistic, the area of the region is much less that the area of the enclosing square, and the region is long and snaky.  Then go to higher dimensions, and eventually to a system of hard spheres.  To be more generally applicable, the next step would be a general potential (think of a hilly field and we want to know the volume of soil is in the field)&lt;br /&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5063286-107058344590509021?l=quantum_mc.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://quantum_mc.blogspot.com/feeds/107058344590509021/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5063286&amp;postID=107058344590509021' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5063286/posts/default/107058344590509021'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5063286/posts/default/107058344590509021'/><link rel='alternate' type='text/html' href='http://quantum_mc.blogspot.com/2003/12/free-energy-chronicles-free-energy.html' title=''/><author><name>Mark</name><uri>http://www.blogger.com/profile/03956296363343527391</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5063286.post-106851927792111381</id><published>2003-11-10T20:54:00.000-06:00</published><updated>2003-11-10T20:56:09.530-06:00</updated><title type='text'></title><content type='html'>&lt;h3&gt;Interesting notes&lt;/h3&gt;&lt;br /&gt;  While searching for Monte Carlo information on the web, I ran across Jonathon Goodman's &lt;a href="http://www.math.nyu.edu/faculty/goodman/teaching/Monte_Carlo/monte_carlo.html"&gt;Monte-Carlo Course Materials&lt;/a&gt;.  One interesting part was Alan Sokal's introductory notes near the bottom (see also this &lt;a href="http://citeseer.nj.nec.com/sokal96monte.html"&gt;CiteSeer link&lt;/a&gt;).  I liked these notes because they covered a practical method for computing the autocorrelation time.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5063286-106851927792111381?l=quantum_mc.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://quantum_mc.blogspot.com/feeds/106851927792111381/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5063286&amp;postID=106851927792111381' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5063286/posts/default/106851927792111381'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5063286/posts/default/106851927792111381'/><link rel='alternate' type='text/html' href='http://quantum_mc.blogspot.com/2003/11/interesting-notes-while-searching-for.html' title=''/><author><name>Mark</name><uri>http://www.blogger.com/profile/03956296363343527391</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5063286.post-106783821503039725</id><published>2003-11-02T23:43:00.000-06:00</published><updated>2003-11-02T23:50:09.153-06:00</updated><title type='text'></title><content type='html'>&lt;h3&gt;Optimization&lt;/h3&gt;&lt;br /&gt;Recently there were two papers in the Journal of Chemical Physics related to QMC optimization.  The first, &lt;a href="http://link.aip.org/link/?jcp/119/9386"&gt;Geometry optimization in quantum Monte Carlo with solution mapping: Application to formaldehyde&lt;/a&gt;, is concerned with optimization of nuclear positions using only energy information, and not gradient (force) information, since it is noisier and harder to obtain.  They use statistical experiment design techniques to pick coordinates at which to perform the energy computations, and fit that data to a quadratic form.  The the geometry was then optimized using that fitted form.&lt;br /&gt;&lt;p&gt;&lt;br /&gt;The second paper is concerned with optimizing the one-body part of the wavefunction: &lt;a href="http://link.aip.org/link/?jcp/119/10015"&gt;Transcorrelated method for electronic systems coupled with variational Monte Carlo calculation&lt;/a&gt;.  The authors use a transcorrelated Hamiltonian (some of the correlation has been moved into the Hamilitonian), and compute the SCF solution for the one-body orbitals.  They use regular VMC to optimize the Jastrow factors.  Note that the two calcuations are coupled, and to reach a solution the procedure is to alternately optimize the one-body and Jastrow factors.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5063286-106783821503039725?l=quantum_mc.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://quantum_mc.blogspot.com/feeds/106783821503039725/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5063286&amp;postID=106783821503039725' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5063286/posts/default/106783821503039725'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5063286/posts/default/106783821503039725'/><link rel='alternate' type='text/html' href='http://quantum_mc.blogspot.com/2003/11/optimization-recently-there-were-two.html' title=''/><author><name>Mark</name><uri>http://www.blogger.com/profile/03956296363343527391</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5063286.post-106564376448447219</id><published>2003-10-08T15:09:00.000-05:00</published><updated>2003-10-08T15:17:45.313-05:00</updated><title type='text'></title><content type='html'>&lt;h3&gt;Monte Carlo on the Graphics Card&lt;/h3&gt;&lt;br /&gt;&lt;br /&gt;A recent short paper on &lt;a href="http://www.arxiv.org/abs/cs.GR/0310002"&gt;The Graphics Card as Streaming Computer&lt;/a&gt; (see related &lt;a href="http://www.research.att.com/conf/mpds2003/schedule/venkatasubramanian-talk.pdf"&gt;presentation slides&lt;/a&gt;) got me wondering if Monte Carlo could be programmed onto a graphics card.&lt;br /&gt;&lt;p&gt;&lt;br /&gt;The proposed &lt;a href="http://www.theinquirer.net/?article=11864"&gt;Protein Explorer&lt;/a&gt; from Japan, using a &lt;a href="http://astrogrape.org"&gt;GRAPE&lt;/a&gt; type architecture, follows a similar programming model.&lt;br /&gt;&lt;p&gt;&lt;br /&gt;One limitation is the precision of the calculations.  Single precision at best, some cards only have 8-16 bits. The &lt;a href="http://link.aip.org/link/?JCP/110/9812"&gt;penalty method&lt;/a&gt; or related methods may be useful for correcting errors due to finite precision. (See also &lt;a href="http://link.aps.org/abstract/PRL/v91/e030201"&gt;Ball, Fink, and Bowler&lt;/a&gt;)&lt;br /&gt;&lt;p&gt;&lt;br /&gt;Another limitation is the size and complexity of the code that can execute on the graphics card.  This might be more useful for simple classical Monte Carlo simluations that QMC. &lt;br /&gt;&lt;p&gt;&lt;br /&gt;I suspect this falls into the category of "cool ideas that would be fun to play with, but spending the time researching better algorithms is probably more effective".&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5063286-106564376448447219?l=quantum_mc.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://quantum_mc.blogspot.com/feeds/106564376448447219/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5063286&amp;postID=106564376448447219' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5063286/posts/default/106564376448447219'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5063286/posts/default/106564376448447219'/><link rel='alternate' type='text/html' href='http://quantum_mc.blogspot.com/2003/10/monte-carlo-on-graphics-card-recent.html' title=''/><author><name>Mark</name><uri>http://www.blogger.com/profile/03956296363343527391</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5063286.post-106507355338631177</id><published>2003-10-02T00:45:00.000-05:00</published><updated>2003-10-02T00:45:53.123-05:00</updated><title type='text'></title><content type='html'>&lt;h3&gt;Of Wavefunctions and Wikis&lt;/h3&gt;&lt;br /&gt;and mailing lists (but that didn't alliterate nicely in the title).&lt;br /&gt;&lt;p&gt;&lt;br /&gt;There's a new &lt;a href="http://qmc.aspuru.com/"&gt;QMC Mailing list&lt;/a&gt; in town.   Be the first on your block to sign up.&lt;br /&gt;&lt;p&gt;&lt;br /&gt;Also there's a QMC Wiki (A wiki is an easily editable set of community web pages) (No link yet - you'll have to sign up for the mailing list and look at the Sept. archives to get the address)&lt;br /&gt;&lt;p&gt;&lt;br /&gt;Both of these are brought to you by &lt;a href="http://alan.aspuru.com/news.php?cat=2"&gt;Alan Aspuru-Guzik&lt;/a&gt;. &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5063286-106507355338631177?l=quantum_mc.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://quantum_mc.blogspot.com/feeds/106507355338631177/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5063286&amp;postID=106507355338631177' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5063286/posts/default/106507355338631177'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5063286/posts/default/106507355338631177'/><link rel='alternate' type='text/html' href='http://quantum_mc.blogspot.com/2003/10/of-wavefunctions-and-wikis-and-mailing.html' title=''/><author><name>Mark</name><uri>http://www.blogger.com/profile/03956296363343527391</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5063286.post-106333883185988113</id><published>2003-09-11T22:53:00.000-05:00</published><updated>2003-09-11T22:53:51.723-05:00</updated><title type='text'></title><content type='html'>&lt;h3&gt;Linear charged particle simulations&lt;/h3&gt;&lt;br /&gt;&lt;br /&gt; Today's paper is by Joerg Rottler and A.C. Maggs, entitled &lt;a href="http://www.arxiv.org/abs/cond-mat/0308441"&gt;"A Continuum,O(N) Monte-Carlo algorithm for charged particles"&lt;/a&gt;.  There are some earlier papers in the references where this method was developed for lattice systems.&lt;br /&gt; &lt;br /&gt;As near as I can tell, the algorithm works by writing the total energy in terms of the electric field rather than the electric potential.  The electric field is put on a grid.  Particle moves then only require local updates to the electric field grid.&lt;br /&gt;&lt;br /&gt;The electrostatic interaction is generated as a result of minimizing the energy functional (functional of the electric field).  The algorithm they give is supposed to recover the proper interaction by a Monte Carlo means.  This is the part I don't quite understand yet.&lt;br /&gt;&lt;br /&gt;It seems like a good example of exploiting Monte Carlo to reduce the complexity of a problem by solving it on average.&lt;br /&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5063286-106333883185988113?l=quantum_mc.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://quantum_mc.blogspot.com/feeds/106333883185988113/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5063286&amp;postID=106333883185988113' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5063286/posts/default/106333883185988113'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5063286/posts/default/106333883185988113'/><link rel='alternate' type='text/html' href='http://quantum_mc.blogspot.com/2003/09/linear-charged-particle-simulations.html' title=''/><author><name>Mark</name><uri>http://www.blogger.com/profile/03956296363343527391</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5063286.post-105902106108499195</id><published>2003-07-23T23:31:00.000-05:00</published><updated>2003-07-23T23:35:34.693-05:00</updated><title type='text'></title><content type='html'>&lt;h3&gt;Linear scaling QMC&lt;/h3&gt;&lt;br /&gt;&lt;br /&gt;"Linear scaling of the local energy in quantum Monte Carlo" &lt;a href="http://link.aip.org/link/?jcp/119/1307"&gt;JCP 119, 1307&lt;/a&gt; by Manten and Luchow.&lt;br /&gt;&lt;p&gt;&lt;br /&gt;Cutting off the orbitals and using sparse matrix computations for the determinant, and cutting of the Jastrow factor are the time consuming parts.&lt;br /&gt;&lt;p&gt;&lt;br /&gt;One interesting point - they use a topological cutoff for the orbitals rather than a strictly spatial cutoff. &lt;br /&gt;&lt;p&gt; &lt;br /&gt;This is the scaling of the local energy with the number of electrons - I'm curious how the correlation time varies with system size.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5063286-105902106108499195?l=quantum_mc.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://quantum_mc.blogspot.com/feeds/105902106108499195/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5063286&amp;postID=105902106108499195' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5063286/posts/default/105902106108499195'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5063286/posts/default/105902106108499195'/><link rel='alternate' type='text/html' href='http://quantum_mc.blogspot.com/2003/07/linear-scaling-qmc-linear-scaling-of.html' title=''/><author><name>Mark</name><uri>http://www.blogger.com/profile/03956296363343527391</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5063286.post-95807562</id><published>2003-06-18T18:06:00.000-05:00</published><updated>2003-06-18T18:06:55.903-05:00</updated><title type='text'></title><content type='html'>&lt;h3&gt;50th Anniversary of the Metropolis Algorithm&lt;/h3&gt;&lt;br /&gt;&lt;br /&gt;Last week I attended a conference on the &lt;a href ="http://cnls.lanl.gov/Conferences/MonteCarloMethods/"&gt;50th Anniversary of the Metropolis Algorithm&lt;/a&gt; at Los Alamos.  To give proper credit to all the authors, it should be the Metropolis, Rosenbluth, Rosenbluth, Teller, and Teller (MRRTT) method, but most people just call it the "Metropolis method" (or algorithm).&lt;br /&gt;&lt;p&gt;&lt;br /&gt;I enjoyed meeting people at the conference, learning more about various techniques (look for future posts), and visiting New Mexico (my first time there).&lt;br /&gt;&lt;p&gt;&lt;br /&gt;One of the sessions was a history of the Metropolis method, and Marshall Rosenbluth gave a talk.  It was good to hear from one of the original authors.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5063286-95807562?l=quantum_mc.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://quantum_mc.blogspot.com/feeds/95807562/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5063286&amp;postID=95807562' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5063286/posts/default/95807562'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5063286/posts/default/95807562'/><link rel='alternate' type='text/html' href='http://quantum_mc.blogspot.com/2003/06/50th-anniversary-of-metropolis.html' title=''/><author><name>Mark</name><uri>http://www.blogger.com/profile/03956296363343527391</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5063286.post-94185547</id><published>2003-05-12T00:02:00.000-05:00</published><updated>2003-05-12T00:07:07.000-05:00</updated><title type='text'></title><content type='html'>&lt;h3&gt;Convergence Diagnostics&lt;/h3&gt;&lt;br /&gt;&lt;a href = "2003_03_09_quantum_mc_archive.html#90569935"&gt;A while ago&lt;/a&gt; I expressed a desire for better automatic control of Monte Carlo simulations.  The magic keyword seems to be "convergence diagnostics".&lt;br /&gt;&lt;p&gt;&lt;br /&gt;Statistics practitioners discovered that the Metropolis method (and other Markov Chain methods) were useful for integrals in Bayesian analysis.  (&lt;a href="http://www.ceremade.dauphine.fr/~xian/10years.html"&gt;handy overview&lt;/a&gt;)&lt;br /&gt;I suppose being statistics researchers, they worried more about convergence more that physicists(?)  Note there are two convergence worries - has the algorithm reached the long-time limit (stationary distribution), and has it converged to the desired distribution?&lt;br /&gt;&lt;p&gt;&lt;br /&gt;The most recent review  of the various convergence diagnostics that I've   found is by &lt;a href="http://www.maths.surrey.ac.uk/personal/st/S.Brooks/mypapers/bror95a.html"&gt;Brooks and Roberts&lt;/a&gt; (1999).   Not all the diagnostics are applicable to Metropolis sampling (or Metropolis-Hastings, as generalized Metropolis is called).&lt;br /&gt;&lt;p&gt;&lt;br /&gt;The other interesting item to look at is "convergence acceleration" and see if any those techniques are useful for physics simulations.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5063286-94185547?l=quantum_mc.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://quantum_mc.blogspot.com/feeds/94185547/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5063286&amp;postID=94185547' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5063286/posts/default/94185547'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5063286/posts/default/94185547'/><link rel='alternate' type='text/html' href='http://quantum_mc.blogspot.com/2003/05/convergence-diagnostics-while-ago-i.html' title=''/><author><name>Mark</name><uri>http://www.blogger.com/profile/03956296363343527391</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5063286.post-93093338</id><published>2003-04-22T23:57:00.000-05:00</published><updated>2003-04-23T00:03:25.000-05:00</updated><title type='text'></title><content type='html'>&lt;h3&gt;Randomness as a professional disease&lt;/h3&gt;&lt;br /&gt;&lt;br /&gt;In the May/June 2003 issue of Computing in Science and Engineering,  Dietrich Stauffer has an article on Sociophyics Simulations (p. 71):&lt;br /&gt;&lt;p&gt;&lt;br /&gt;"Statistical physicists, of course, assume that these hierarchies arise from randomness (The illusion that everything is random is a professional disease - &lt;i&gt;morbus Boltzmann&lt;/i&gt; - among such physicists, just as &lt;i&gt;silicosis&lt;/i&gt;, or black lung, affects mine workers)"&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5063286-93093338?l=quantum_mc.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://quantum_mc.blogspot.com/feeds/93093338/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5063286&amp;postID=93093338' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5063286/posts/default/93093338'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5063286/posts/default/93093338'/><link rel='alternate' type='text/html' href='http://quantum_mc.blogspot.com/2003/04/randomness-as-professional-disease-in.html' title=''/><author><name>Mark</name><uri>http://www.blogger.com/profile/03956296363343527391</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5063286.post-92891903</id><published>2003-04-19T11:02:00.000-05:00</published><updated>2003-04-19T13:41:24.000-05:00</updated><title type='text'></title><content type='html'>&lt;h3&gt;Generating trial moves cheaply&lt;/h3&gt;&lt;br /&gt;&lt;br /&gt; Today's article is "Monte Carlo simulations using sampling from an approximate potential" by Lev Gelb (&lt;a href="http://link.aip.org/link/?jcp/118/7747"&gt;JCP 118, 7747&lt;/a&gt;).  He describes using an approxmiate potential to make a series of (cheap) moves and then accept or reject that series of moves based on the desired (correct, expensive) potential.  This is similar to (but not quite the same as) Multilevel Monte Carlo in other work.  The focus of multilevel sampling is early rejection of ultimately undesirable trial moves.  The focus of Gelb's method seems to be creating uncorrelated trial moves to evaluate with the expensive potential.&lt;br /&gt;&lt;p&gt;&lt;br /&gt;I'm a little disappointed that the author didn't reference the similar multilevel Monte Carlo  used in PIMC (&lt;a href="http://cornell.mirror.aps.org/abstract/RMP/v67/i2/p279_1"&gt;RMP 67, 279&lt;/a&gt;) (see section V.F, p. 329) and VMC (&lt;a href="http://link.aip.org/link/?jcp/113/5123"&gt;JCP 113,  5123&lt;/a&gt;).&lt;br /&gt;&lt;p&gt;&lt;br /&gt;On page 7749, he mentions that an empirical potential could be used as the approximate potential and an ab initio potential for the correct potential.  This has &lt;a href="http://archive.ncsa.uiuc.edu/Apps/CMP/dewing/thesis/node39.html"&gt;been done&lt;/a&gt;, sort of. (Also in &lt;a href="http://www.wspc.com/books/chemistry/4956.html"&gt;Recent Advances in Quantum Monte Carlo Methods II&lt;/a&gt; (World Scientific 2002) or &lt;a href="http://archive.ncsa.uiuc.edu/Apps/CMP/papers/dew01/dew01.html"&gt;here&lt;/a&gt; .) I called the technique "pre-rejection".   Consider using Gelb's method, but make only a single trial move using the approximate potential.  If that trial move is rejected, then the energy change is clearly zero, and we know the move will be accepted without having to evaluate the expensive potential.  This shortcut can be extended to more trial moves, but its value decreases dramatically as the probability that all the trial moves (with the approximate potential) will be rejected becomes very small.&lt;br /&gt;&lt;p&gt;&lt;br /&gt;Gelb applied his method to a Lennard-Jones fluid where the potential is cut and shifted.  The approximate potential is the potential with a short cutoff and the correct potential has a larger cutoff. &lt;br /&gt;&lt;p&gt;&lt;br /&gt;Table I shows speedups and energies (and pressures and heat capacities) with error bars.  There seems to a tradeoff - more speed up lowers the acceptance ratio and leads to larger error bars.  This can be quantified by computing the efficiency  1/ (T * sigma^2) (or Speedup/sigma^2).  Computing efficiencies  for system 1 gives&lt;br /&gt;&lt;table&gt;&lt;br /&gt;&lt;tr&gt; &lt;td&gt;System&lt;/td&gt;  &lt;td&gt; Efficiency of Energy (x10&lt;sup&gt;4&lt;/sup&gt;) &lt;/td&gt; &lt;/tr&gt;&lt;br /&gt;&lt;tr&gt;  &lt;td&gt; 1(ref) &lt;/td&gt; &lt;td&gt;12&lt;/td&gt; &lt;/tr&gt;&lt;br /&gt;&lt;tr&gt;  &lt;td&gt; 1(a) &lt;/td&gt; &lt;td&gt;14 &lt;/td&gt;&lt;/tr&gt;&lt;br /&gt;&lt;tr&gt;  &lt;td&gt; 1(b) &lt;/td&gt; &lt;td&gt;19 &lt;/td&gt;&lt;/tr&gt;&lt;br /&gt;&lt;tr&gt;  &lt;td&gt; 1(c) &lt;/td&gt; &lt;td&gt;14 &lt;/td&gt;&lt;/tr&gt;&lt;br /&gt;&lt;tr&gt;  &lt;td&gt; 1(d) &lt;/td&gt; &lt;td&gt;25 &lt;/td&gt;&lt;/tr&gt;&lt;br /&gt;&lt;/table&gt;&lt;br /&gt;From the paper, it looks like a,b and c,d have the same parameters of relevance (rc and M) and that this method definitely does increase the efficiency.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5063286-92891903?l=quantum_mc.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://quantum_mc.blogspot.com/feeds/92891903/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5063286&amp;postID=92891903' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5063286/posts/default/92891903'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5063286/posts/default/92891903'/><link rel='alternate' type='text/html' href='http://quantum_mc.blogspot.com/2003/04/generating-trial-moves-cheaply-todays.html' title=''/><author><name>Mark</name><uri>http://www.blogger.com/profile/03956296363343527391</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5063286.post-92819776</id><published>2003-04-17T23:33:00.000-05:00</published><updated>2003-04-17T23:33:58.983-05:00</updated><title type='text'></title><content type='html'>&lt;h3&gt;The Quest for Better Wavefunctions&lt;/h3&gt;&lt;br /&gt;One of the nice features of QMC is the freedom in the choice of wavefunction.  The downside is it can be time consuming and unwieldy to optimize them in VMC.&lt;br /&gt;&lt;p&gt;&lt;br /&gt;In a recent article -  &lt;a href="http://www.arxiv.org/abs/cond-mat/0304165"&gt;Backflow Correlations for the Electron Gas and Metallic Hydrogen&lt;/a&gt; - Holzmann,  et al. look at improving wavefunctions through adding analytic information.&lt;br /&gt;&lt;p&gt;&lt;br /&gt;The section with the Feynman-Kacs approach uses a cumulant expansion.  In case you (read: me) need a reminder of the cumulant expansion, look at this &lt;a href="http://stp.clarku.edu/notes/"&gt;online statistics text&lt;/a&gt; (chapter 8.4).&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5063286-92819776?l=quantum_mc.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://quantum_mc.blogspot.com/feeds/92819776/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5063286&amp;postID=92819776' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5063286/posts/default/92819776'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5063286/posts/default/92819776'/><link rel='alternate' type='text/html' href='http://quantum_mc.blogspot.com/2003/04/quest-for-better-wavefunctions-one-of.html' title=''/><author><name>Mark</name><uri>http://www.blogger.com/profile/03956296363343527391</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5063286.post-92339283</id><published>2003-04-09T23:42:00.000-05:00</published><updated>2007-04-09T22:45:54.213-05:00</updated><title type='text'></title><content type='html'>&lt;h3&gt;Followup to "Testing Monte Carlo"&lt;/h3&gt;&lt;br /&gt;&lt;br /&gt;I wrote a program that uses Simpson's rule to compute the energy of two particles in a box interacting via a Lennard-Jones potential&lt;br /&gt;&lt;br&gt;&lt;br /&gt;The web page and program are &lt;a href="http://www.markdewing.com/qmc/testmc.html"&gt;here&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;It runs in a second or so on my 1 GHz P3.  I expect 3 particles should be doable.&lt;br /&gt;&lt;p&gt;&lt;br /&gt;Edit 9/4/2004, fixed the link.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5063286-92339283?l=quantum_mc.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5063286/posts/default/92339283'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5063286/posts/default/92339283'/><link rel='alternate' type='text/html' href='http://quantum_mc.blogspot.com/2003/04/followup-to-testing-monte-carlo-i.html' title=''/><author><name>Mark</name><uri>http://www.blogger.com/profile/03956296363343527391</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author></entry><entry><id>tag:blogger.com,1999:blog-5063286.post-92188387</id><published>2003-04-07T20:28:00.000-05:00</published><updated>2003-04-09T23:45:54.000-05:00</updated><title type='text'></title><content type='html'>&lt;h3&gt;Testing Monte Carlo&lt;/h3&gt;&lt;br /&gt;You've just written a brand new Monte Carlo code.  It's producing vast amounts of data on your fast new computer.  How do know if that random looking time series will average to a beautiful result and lead to deep insight, or is it simply random noise from the physics of some other universe?&lt;br /&gt;&lt;p&gt;&lt;br /&gt;There are several techniques we can use to verify that the codes we write are working correctly.&lt;br /&gt;&lt;ol&gt;&lt;br /&gt;&lt;li&gt;&lt;b&gt;Unit testing&lt;/b&gt;&lt;br&gt;  This is standard software engineering (or *should* be standard).  This involves small drivers to test individual classes or routines.   It's good for verifying small, easily understood pieces before integrating into a larger system and for regression testing (making sure the latest change didn't break something).&lt;br /&gt;&lt;li&gt;&lt;b&gt;Solve simple systems with analytic or well-known answers.&lt;/b&gt;&lt;br&gt;  The harmonic oscillator is popular.  For QMC, H&lt;sub&gt;2&lt;/sub&gt; is very well known, and very accurate answers are known from other techniques.&lt;br /&gt;&lt;li&gt;&lt;b&gt;Compute internal quantities in multiple ways&lt;/b&gt;.&lt;br&gt;  The best example in QMC is the local energy - compute the derivatives analytically and numerically.  In PIMC there are multiple energy estimators.&lt;br /&gt;&lt;li&gt;&lt;b&gt;Compute system values with another integration method.&lt;/b&gt;&lt;br&gt;  It seems that computers are fast enough that we should be able to use grid-based methods to compute answers for small numbers (1-3) of particles.&lt;br /&gt;For QMC, shutting off the electron-electron interaction simplifies the problem, and Mathematica can handle the resulting integrals (numerically, not symbolically)&lt;br /&gt;&lt;li&gt;&lt;b&gt;Comparison with literature&lt;/b&gt;&lt;br&gt;Compare with experiment and answers obtained by other methods.&lt;br /&gt;&lt;/ol&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5063286-92188387?l=quantum_mc.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://quantum_mc.blogspot.com/feeds/92188387/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5063286&amp;postID=92188387' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5063286/posts/default/92188387'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5063286/posts/default/92188387'/><link rel='alternate' type='text/html' href='http://quantum_mc.blogspot.com/2003/04/testing-monte-carlo-youve-just-written.html' title=''/><author><name>Mark</name><uri>http://www.blogger.com/profile/03956296363343527391</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5063286.post-91589011</id><published>2003-03-28T23:44:00.000-06:00</published><updated>2003-03-28T23:51:28.000-06:00</updated><title type='text'></title><content type='html'>&lt;h3&gt;Do you believe your error bars?&lt;/h3&gt;&lt;br /&gt;&lt;br /&gt;Computing uncertainty estimates from Monte Carlo data usually assumes the data  is normal (or can be sufficiently reblocked to be normal, according to the central limit theorem).  But what if we don't have quite that much data - what effect would the underlying distribution have on the uncertainty estimates (error bars)?&lt;br /&gt;&lt;p&gt;&lt;br /&gt;Mervlyn Moodley looks at this question in the paper &lt;a href="http://www.arxiv.org/abs/cond-mat/0303594"&gt;The Lognormal Distribution and Quantum Monte Carlo Data&lt;/a&gt;. &lt;br /&gt;&lt;p&gt;&lt;br /&gt;The interesting figures seem to be figures 3 and 9.  In Figure 3, we see the confidence intervals change as the data is reblocked (and hence comes closer to normal).  Figure 9 is generated from a real simulation, and it seems there is very little difference between the error bars computed assuming normality and those taking the underlying lognormal distribution into account.&lt;br /&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5063286-91589011?l=quantum_mc.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://quantum_mc.blogspot.com/feeds/91589011/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5063286&amp;postID=91589011' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5063286/posts/default/91589011'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5063286/posts/default/91589011'/><link rel='alternate' type='text/html' href='http://quantum_mc.blogspot.com/2003/03/do-you-believe-your-error-bars.html' title=''/><author><name>Mark</name><uri>http://www.blogger.com/profile/03956296363343527391</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5063286.post-90901022</id><published>2003-03-17T22:14:00.000-06:00</published><updated>2003-03-17T22:14:51.106-06:00</updated><title type='text'></title><content type='html'>&lt;h3&gt;Bilinear QMC&lt;/h3&gt;&lt;br /&gt;I'm reading a recent paper by Arias de Saavedra and Kalos titled "Bilinear diffusion quantum Monte Carlo methods" (&lt;a href="http://link.aps.org/abstract/PRE/v67/e026708"&gt;PRE 67, 026708&lt;/a&gt;).   They present an algorithm that uses a pair of walkers (the bilinear part) to sample the square of the ground state wavefunction (rather than first power of the wavefunction like DMC).&lt;br /&gt;&lt;p&gt;&lt;br /&gt;They claim it's useful for computing unbiased expectation values (see my post from &lt;a href="http://quantum_mc.blogspot.com#89693025"&gt;Monday, Feb. 24&lt;/a&gt; - although I'm not sure it would help with derivative operators) and energy differences.&lt;br /&gt;&lt;p&gt;&lt;br /&gt;The part I find most intriguing is the way they use importance sampling - they get reasonable results for hydrogen without it.  And when they do use importance sampling, it's only to remove singularities due to cusps.  I would guess that any successful scheme (ie, able to scale reasonably with system size)  needs to use as an accurate a trial wavefunction as possible to guide the sampling.&lt;br /&gt;&lt;p&gt;&lt;br /&gt;The more I study the paper, the less I understand it.  I guess the first step is to try reproduce their results for the 1-D harmonic oscillator.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5063286-90901022?l=quantum_mc.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://quantum_mc.blogspot.com/feeds/90901022/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5063286&amp;postID=90901022' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5063286/posts/default/90901022'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5063286/posts/default/90901022'/><link rel='alternate' type='text/html' href='http://quantum_mc.blogspot.com/2003/03/bilinear-qmc-im-reading-recent-paper.html' title=''/><author><name>Mark</name><uri>http://www.blogger.com/profile/03956296363343527391</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5063286.post-90569935</id><published>2003-03-11T23:35:00.000-06:00</published><updated>2003-03-11T23:43:14.000-06:00</updated><title type='text'></title><content type='html'>&lt;h3&gt;Steal this research idea&lt;/h3&gt;&lt;br /&gt;Automatic control of Monte Carlo simulations - I want to know how to do it, but I don't necessarily want to figure it out myself. :)&lt;br /&gt;&lt;ul&gt;&lt;br /&gt;&lt;li&gt; &lt;strong&gt;Determining equilibrium and phase transitions.&lt;/strong&gt; &lt;br&gt; Typically the particles are started in a lattice or random configuration and let run a whlie to equilibrate.   I want automatic detection of equilibrium, which is especially tricky near phase boundaries.  Also near phase transitions, the system can suddenly change phases.&lt;br /&gt;&lt;li&gt; &lt;strong&gt;Adjustment of parameters for optimum efficiency&lt;/strong&gt; &lt;br&gt;The key quantity affecting the efficiency is the correlation time, but it's very noisy.  Is there some other quantity that we could use that would behave similarly, but with less noise?  Since this will only affect the efficiency, approximations are quite okay.   Like assuming some analytic form for the autocorrelation function with a small number of parameters and fitting to it?&lt;br /&gt;&lt;p&gt;&lt;br /&gt;Also note that SGA-like algorithms can be used for control as well as optimization.   The decay parameter reaches a constant to follow the system, rather than continuing to decrease, as in optimization.&lt;br /&gt;&lt;li&gt; &lt;strong&gt;Better control of DMC population&lt;/strong&gt;&lt;br&gt;&lt;br /&gt;Occasionally, I have trouble with the number of walkers increasing rapidly.  In my codes, this means it exceeds some maximum value and stops the program.   Sometimes the number of walkers jumps to a large but stable value, and the energy becomes far too low and clearly wrong.  The hard part is that population control introduces a bias, and can't be too intrusive.&lt;br /&gt;&lt;p&gt;&lt;br /&gt;For these items, are there any concepts from control theory or signal processing that would be useful?&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5063286-90569935?l=quantum_mc.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://quantum_mc.blogspot.com/feeds/90569935/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5063286&amp;postID=90569935' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5063286/posts/default/90569935'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5063286/posts/default/90569935'/><link rel='alternate' type='text/html' href='http://quantum_mc.blogspot.com/2003/03/steal-this-research-idea-automatic.html' title=''/><author><name>Mark</name><uri>http://www.blogger.com/profile/03956296363343527391</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5063286.post-90158064</id><published>2003-03-04T23:02:00.000-06:00</published><updated>2003-03-04T23:02:04.090-06:00</updated><title type='text'></title><content type='html'>&lt;h3&gt;Dynamic Monte Carlo&lt;/h3&gt;&lt;br /&gt;Checking the &lt;a href="www.arxiv.org"&gt;arxiv.org&lt;/a&gt; preprint server, there was an article titled &lt;a href="http://www.arxiv.org/abs/cond-mat/0303028"&gt;An Introduction To Monte Carlo Simulations Of Surface Reactions&lt;/a&gt; by A.P.J. Jansen, which describes Dynamic Monte Carlo methods (Kinetic Monte Carlo is similar).  One important input is transition probabilities.  On page 21,  "Estimates of the error made using DFT for such systems are at least about 10 kJ/mol."&lt;br /&gt;&lt;p&gt;&lt;br /&gt;Can QMC do better?&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5063286-90158064?l=quantum_mc.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://quantum_mc.blogspot.com/feeds/90158064/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5063286&amp;postID=90158064' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5063286/posts/default/90158064'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5063286/posts/default/90158064'/><link rel='alternate' type='text/html' href='http://quantum_mc.blogspot.com/2003/03/dynamic-monte-carlo-checking-arxiv.html' title=''/><author><name>Mark</name><uri>http://www.blogger.com/profile/03956296363343527391</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5063286.post-89887236</id><published>2003-02-28T00:33:00.000-06:00</published><updated>2003-02-28T20:49:43.000-06:00</updated><title type='text'></title><content type='html'>&lt;h3&gt;VMC Optimization: SGA vs. fixed sample reweighting&lt;/h3&gt;&lt;br /&gt;In VMC, we parameterize the wave function and vary the parameters until the minimum energy (or variance) is reached.  Fixed sample reweighting generates a number of configurations from the MC process, and then uses a least squares minimization algorithm and a reweighting estimate for the energy to minimize the variance of the energies.&lt;br /&gt;&lt;p&gt;&lt;br /&gt;The Stochastic Gradient Approximation (SGA) takes a noisy estimate of the gradient and moves in that direction ("downhill").   The amount it moves is scaled by a variable that decreases each iteration (usually 1/n).  It is guaranteed to converge, but it may take a while.&lt;br /&gt;&lt;p&gt;&lt;br /&gt;I don't like the fixed sample reweighting (FSR) method on aesthetic grounds.  SGA feels more in line with the "Monte Carlo spirit".   FSR feels like it is taking very coarse steps: sample configurations for a while, stop and do a minimization, repeat these two steps for a few iterations.  Each step is large, and results in significant improvement.  The SGA, on the other hand takes a large number of small steps.  Each individual step doesn't give much improvement (or any improvement at all), but the steps accumulate to give a good answer. &lt;br /&gt;&lt;p&gt;&lt;br /&gt;Aesthetic considerations aside, FSR requires no analytic gradients for efficient implementation.  SGA needs analytic gradients for most of the parameters (you could do numerical gradients, but the time gets much worse)&lt;br /&gt;&lt;p&gt;&lt;br /&gt;FSR does variance minimization, and SGA does energy minimization - there may be some differences in the resulting quality of the wave functions (&lt;a href="http://link.aip.org/link/?jcp/112/4935"&gt;JCP 112, 4935&lt;/a&gt;)&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5063286-89887236?l=quantum_mc.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://quantum_mc.blogspot.com/feeds/89887236/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5063286&amp;postID=89887236' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5063286/posts/default/89887236'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5063286/posts/default/89887236'/><link rel='alternate' type='text/html' href='http://quantum_mc.blogspot.com/2003/02/vmc-optimization-sga-vs.html' title=''/><author><name>Mark</name><uri>http://www.blogger.com/profile/03956296363343527391</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5063286.post-89693025</id><published>2003-02-24T23:10:00.000-06:00</published><updated>2003-02-24T23:11:24.000-06:00</updated><title type='text'></title><content type='html'>&lt;h3&gt;Derivative operators and forward walking in DMC&lt;/h3&gt;&lt;br /&gt;Using Diffusion Monte Carlo (DMC) to compute estimators other than the energy leads to a "mixed estimator"- an average that combines the trial wavefunction and the exact ground state (actually the fixed node ground state) - not what we really want.  However, the number of children of each walker after a long time is proportional to the ratio of the fixed node ground state to the trial wavefunction.  This leads to the forward walking procedure for obtaining correct averages over the fixed node ground state.  See Casulleras and Boronat ( &lt;a href="http://cornell.mirror.aps.org/abstract/PRB/v52/i5/p3654_"&gt;PRB 52, 3654&lt;/a&gt;)  for examples, references, and implementation details.&lt;br /&gt;&lt;p&gt;&lt;br /&gt;Numerical values for derivative operators, such as the kinetic energy, are computed by applying the operator to the trial wavefunction.  The forward walking procedure only corrects the distribution in the average, not the values of the estimator. (we really want the derivative applied to the exact wavefunction, not the trial wavefunction).&lt;br /&gt;&lt;p&gt;&lt;br /&gt;Computing the kinetic energy (and the pressure) by naively doing forward walking on the kinetic energy is incorrect.  For the kinetic energy, we can use the total energy and the forward walked potential energy to obtain the kinetic energy.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5063286-89693025?l=quantum_mc.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://quantum_mc.blogspot.com/feeds/89693025/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5063286&amp;postID=89693025' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5063286/posts/default/89693025'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5063286/posts/default/89693025'/><link rel='alternate' type='text/html' href='http://quantum_mc.blogspot.com/2003/02/derivative-operators-and-forward.html' title=''/><author><name>Mark</name><uri>http://www.blogger.com/profile/03956296363343527391</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry></feed>
